SMS Alerts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
yenyen
Posts: 1
Joined: Thu Aug 22, 2013 8:10 pm

SMS Alerts

Post 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$ **"
}
Last edited by slansing on Fri Aug 23, 2013 9:20 am, edited 1 time in total.
Reason: Split post to another topic. Do not post off topic questions in other peoples threads, you will not get faster help this way.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SMS Alerts

Post 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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked