monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mmonit sending messages via pushover using "curl 7.56.1"


From: Marcus Mülbüsch
Subject: mmonit sending messages via pushover using "curl 7.56.1"
Date: Fri, 3 Nov 2017 13:49:12 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Hello,

after I upgraded curl to version 7.56.1 I noticed, that my pushover messages were cut off at the first comma. Whether that is intentional or a bug I do not know (and I do not care), but I wanted to let you know that using "--form-string" instead of "--form" or "-F" solved the problem.

   So instead of:

 curl -s \
   -F "token=your_mmonit_or_monit_app_token" \
   -F "user=your_pushover_net_user_token" \
   -F "message=[$MONIT_HOST] $MONIT_SERVICE - $MONIT_DESCRIPTION" \
   https://api.pushover.net/1/messages.json

you simply use:

 curl -s \
   -F "token=your_mmonit_or_monit_app_token" \
   -F "user=your_pushover_net_user_token" \
   --form_string "message=[$MONIT_HOST] $MONIT_SERVICE - $MONIT_DESCRIPTION" \
   https://api.pushover.net/1/messages.json

and everything will be back as normal, allowing you to send messages that contain a comma.

Could someone with access to the wiki please update the example-sript at:

https://mmonit.com/wiki/MMonit/PushoverNotification

   Thanks,

Marcus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]