hello all,
i have a shell script which takes two arguments, the mobile phone number and the text message, which sends sms notifications.
for example /usr/local/bin/sendsms 6944444444 "host problem"
when i debug Nagios, i can see this into the log file
[1316012199.774170] [256.1] [pid=17625] Running command '/usr/lib/nagios/plugins/sendsms 6944420xxx "Type:PROBLEM, Host: 00-dummy_2, State: DOWN, Address: 194.145.127.44, Info: Unknown ping number, Date/Time: 14-09-2011"'...
but script is not run...
when i run it from a terminal the command
/usr/lib/nagios/plugins/sendsms 6944420xxx "Type:PROBLEM, Host: 00-dummy_2, State: DOWN, Address: 194.145.127.44, Info: Unknown ping number, Date/Time: 14-09-2011"
sms message arrives normally....
Script for sms notification
Re: Script for sms notification
Does the script require root permissions? Try running the command from a terminal as the nagios user:
Code: Select all
# su nagios
$ /usr/lib/nagios/plugins/sendsms 6944420xxx "Type:PROBLEM, Host: 00-dummy_2, State: DOWN, Address: 194.145.127.44, Info: Unknown ping number, Date/Time: 14-09-2011"