Script for sms notification

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Script for sms notification

Postby Lewis » Thu Sep 15, 2011 4:18 am

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....
Lewis
 
Posts: 1
Joined: Thu Sep 15, 2011 4:13 am

Re: Script for sms notification

Postby agriffin » Wed Sep 21, 2011 11:52 am

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"
agriffin
 
Posts: 876
Joined: Mon May 09, 2011 9:36 am


Return to Community Support

Who is online

Users browsing this forum: No registered users and 42 guests