Page 1 of 1

nagios - 'notify-by-sms'

Posted: Thu May 31, 2012 7:35 am
by kico
Please help,

Nagios working ok, everything is ok but 'notify-by-sms' no delivered sms at phone.... i used gsm-utils.... phone is connected via usb
i can send sms from PC with this line: gsmsendsms -d /dev/ttyACM0 +329...... "TEST"...
Thanks :)

Re: nagios - 'notify-by-sms'

Posted: Thu May 31, 2012 9:33 am
by LHammonds
My phones allow sending an email to a text service so I just have my server send an email to [email protected] and I get text alerts that way.

My notifications are sent using the "sendemail" package on Ubuntu.

Here is a copy of my send command in commands.cfg

Code: Select all

define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/sendemail -s 192.168.1.1:25 -f "Nagios <[email protected]>" -t $CONTACTEMAIL$ -u "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
        }

Re: nagios - 'notify-by-sms'

Posted: Thu May 31, 2012 10:33 am
by kico
problem is resolved....
need a permission ttyACM0 for nagios user....

chown nagios /dev/ttyACM0
chmod 666 /dev/ttyACM0

:)

Re: nagios - 'notify-by-sms'

Posted: Mon Jun 04, 2012 11:10 am
by agriffin
Glad you got things figured out!