Notification script problems.. How do I debug

Marc Powell marc at ena.com
Thu Jan 26 22:06:17 CET 2006



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Chad Osmond
> Sent: Thursday, January 26, 2006 11:15 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Notification script problems.. How do I debug
> 
> Hi,
> 
> I'm updating my notification to send SMS messages across the Canadian
> Rogers network. I've found a WWW to SMS gateway that lets me send
> messages, but I need to find why my script is failing.
> 
> My Notification script is as follows:
> # 'notify-by-sms' command definition
> define command{
>         command_name    notify-by-sms
>         command_line    /usr/lib/nagios/plugins/sms-msg.pl -m "Host
> '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $OUTPUT$\nTime: $DATETIME$"
> -p $CONTACTPAGER$
>         }


> 
> Any suggestions, or ideas?

Make sure the command is being called as you expect it --

define command{
        command_name    notify-by-sms
        command_line    echo "/usr/lib/nagios/plugins/sms-msg.pl -m
\"Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $OUTPUT$\nTime: $DATETIME$\" 
-p $CONTACTPAGER$" >> /tmp/smscommand
        }

Verify that you can run the output stored in /tmp/smscommand _as the
nagios user_.

--
Marc 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
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