<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
I've got Nagios 3.0.2 working on Ubuntu 8.04 & the email alerting part is working fine.<BR><BR>I've decided to add SmS functionality, so installed Gammu & have got this working. If I run :-<BR><BR>/usr/bin/printf "This is a test" | /usr/bin/gammu --sendsms TEXT 1234567890<BR><BR>from the terminal (replace 1234567890 with a correct number) I can send TxT messages fine.<BR><BR>I added these lines to the COMMANDS.CFG<BR><BR># 'notify-host-by-sms' command definition<BR>define command{<BR>command_name notify-host-by-sms<BR>command_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$<BR>}<BR><BR><BR># 'notify-service-by-sms' command definition<BR>define command{<BR>command_name notify-service-by-sms<BR>command_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$<BR>} <BR><BR>& this line to the CONTACTS.CFG<BR><BR>define contact{<BR>contact_name Lien<BR>alias Lien<BR>service_notification_period 24x7<BR>host_notification_period 24x7<BR>service_notification_options w,u,c,r,f,s<BR>host_notification_options d,u,r,f,s<BR>service_notification_commands notify-host-by-sms<BR>host_notification_commands notify-service-by-sms<BR>email *******@***********<BR>pager 1234567890<BR>}<BR><BR>I get the email alerts fine & if I look in the NAGIOS.LOG file it has tried to run the SmS command<BR><BR>[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%)<BR><BR>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<BR>
<BR>
command_line /usr/bin/printf "***** Nagios *****" | /usr/bin/gammu --sendsms TEXT 0123456789<BR>
<BR>
& still no message. Is there another log I can look at/enable so I can see any errors.<BR><br /><hr />Find out how to make Messenger your very own TV! <a href='http://clk.atdmt.com/UKM/go/101719648/direct/01/' target='_new'>Try it Now!</a></body>
</html>