Using curl for sms notification (opening url with receiver and status as argument in one line)
Denny Schierz
linuxmail at 4lin.net
Tue Mar 18 17:06:57 CET 2008
hi,
i want to send sms notification. From the console i can use this line:
/usr/local/bin/curl --proxy squid:3128 --insecure
"https://gate1.goyyamobile.com/sms/sendsms.asp?receiver=1234567890&sender=nagios&msg=\$HOSTALIAS\$
\$SERVICEDESC\$ \$NOTIFICATIONTYPE\$ \$SERVICEOUTPUT\$
\$SHORTDATETIME\$&id=123456&pw=pass&time=0&msgtype=c"
this works (needless to say, macros are not changed, they are here just
normal textlines). But i can't get it working as command_line. So i
thought, i have to escape the »$« from the url, with backslashs.
[code]
define command {
command_name notify-service-by-sms
command_line /usr/local/bin/curl --proxy squid:3128
--insecure
"https://gate1.goyyamobile.com/sms/sendsms.asp?receiver=\$CONTACTPAGER\$&sender=123456&msg=\$HOSTALIAS\$
\$SERVICEDESC\$ \$NOTIFICATIONTYPE\$ \$SERVICEOUTPUT\$
\$SHORTDATETIME\$&id=00000&pw=secret&time=0&msgtype=c"
}
[/code]
Is it possible, to get it running, with just a line? or do i need
writing a script?
cu denny
--
Stoppt den Überwachungswahn - Stoppt den Schäuble Katalog:
http://www.nopsis.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080318/5bc58336/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list