I've got Nagios 3.0.2 working on Ubuntu 8.04 & the email alerting part is
working fine.I've decided to add SmS functionality, so installed Gammu & have
got this working. If I run :-/usr/bin/printf "This is a test" | /usr/bin/gammu
--sendsms TEXT 1234567890from the terminal (replace 1234567890 with a correct
number) I can send TxT messages fine.I added these lines to the COMMANDS.CFG#
'notify-host-by-sms' command definitiondefine command{command_name
notify-host-by-smscommand_line /usr/bin/printf "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n" | /usr/bin/gammu --sendsms TEXT $CONTACTPAGER$}#
'notify-service-by-sms' command definitiondefine command{command_name
notify-service-by-smscommand_line /usr/bin/printf "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/gammu
--sendsms TEXT $CONTACTPAGER$} & this line to the CONTACTS.CFGdefine
contact{contact_name Lienalias Lienservice_notification_period
24x7host_notification_period 24x7service_notification_options
w,u,c,r,f,shost_notification_options d,u,r,f,sservice_notification_commands
notify-host-by-smshost_notification_commands notify-service-by-smsemail [EMAIL
PROTECTED] 1234567890}I get the email alerts fine & if I look in the NAGIOS.LOG
file it has tried to run the SmS command[1214991948] SERVICE NOTIFICATION:
Lien;Server;Drive Space C;WARNING;notify-host-by-sms;c:\ - total: 5.82 Gb -
used: 5.13 Gb (88%) - free 0.69 Gb (12%)But I get no text message. I've enabled
login on Gammu & there is nothing in the log, so I'm wondering if it's
something to do with Nagios & the way I've set it up. Can anyone point me in
the right direction of where I should be looking next. I did logon as the
'Nagios' account & test the printf | gammu command works without SUDO. I've
also shortened the command line, just in case Gammu did not like the way it was
formulated, to
command_line /usr/bin/printf "***** Nagios *****" | /usr/bin/gammu --sendsms
TEXT 0123456789
& still no message. Is there another log I can look at/enable so I can see any
errors.
_________________________________________________________________
Find the best and worst places on the planet
http://clk.atdmt.com/UKM/go/101719807/direct/01/
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Nagios-users mailing list
Nagios-users@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