Page 1 of 1

SMS Alerts

Posted: Thu Aug 22, 2013 8:46 pm
by yenyen
Hi,

Anyone can help on SMS Alert?

I'm using GSM to work with Nagios to send sms alert.

The command works if I run in on the shell windows but it doesn't work in Nagios command.cfg, everytime got alert the smsd.log will show waiting for message to send and stop there.

I'm using nagios 3.5 on centos 5

# 'notify-by-sms' command definition - added by Yen Yen
define command{
command_name notify-by-sms
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nState: $SERVICESTATE$ for $SERVICEDURATION$\nAddress: $HOSTADDRESS$\n\nInfo:\n\n$SERVICEOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nACK by: $SERVICEACKAUTHOR$\nComment: $SERVICEACKCOMMENT$\n" | /usr/bin/smssend "myphonenumber" $CONTACTPAGER$ "** $NOTIFICATIONTYPE$ Service Alert: $SERVICEDESC$ on $HOSTALIAS$ is $SERVICESTATE$ **"
}

Re: SMS Alerts

Posted: Fri Aug 23, 2013 1:08 pm
by sreinhardt
What kind of errors are you getting? This is unfortunately not something we can test in-house as we do not presently have the gsm hardware. It also seems that you are piping the normal notification into the sms binary after you have a reasonable sms crafted, is there a reason for this? Do you have a guide you are following?