I have an account with smsapi.pl which provides ability to send sms via http get and i wanted to be notifired if any of the servers go down.
After a bit of trial and error abou escaping characters and ? sign in url i managed to send sms from console using following command:
/tool fetch mode=http address=api.smsapi.pl path="sms.do\3Fusername=USERNAME&password=HASHEDPWD&from=Alert&to=MYNUMBER&message=DB%20SERVER%20DOWN" host=api.smsapi.pl
using winbox I’ve created entry for that server and pasted that command in “on down” section.
It properly recognises that the server went down but there’s no sms.
Here is “/tool netwatch export” output:
# feb/11/2014 09:00:20 by RouterOS 3.10
# software id = 5YFS-3TT
#
/tool netwatch
add comment="" disabled=no down-script="/tool fetch mode=http address=api.smsapi.pl path=\"sms.do\\3Fusername=USERNAME&password=HASHEDPWD&from=Alert\
&to=MYNUMBER&message=DB%20SERVER%20DOWN\" host=api.smsapi.pl" host=192.168.0.1 interval=30s timeout=2s up-script=""
I don’t know what could be wrong mayby escaping charachters got screwed up somehow when pasted the command in winbox.
If anyone has any idea on hw to fix it i would appresieate it greatly
Best regards