Script for sms notification

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

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 Nagios Core

Who is online

Users browsing this forum: Bing [Bot], MSN [Bot] and 27 guests