Hi Simon,<br>Let Nagios to write the action into a file. This is because you should be sure that Nagios runs the command exactly as yours. There can be some exceptions (bugs, some missed escape chars, ...).<br>Thus, see the difference.
<br><br>First of all, let it write into a file. For instance, change the command like,<br>echo '/usr/bin/printf "%b" "Svc:$SERVICEDESC$ ++Host:$HOSTALIAS$ ++
Addr:$HOSTADDRESS$ ++ State:$SERVICESTATE$ ++Date:$SHORTDATETIME$" |
/usr/local/bin/gammu --sendsms TEXT $CONTACTPAGER$' >> /tmp/someTempFile<br><br>After you're sure a notification is done, open that temporary file and get a random line (first, last or any) then try to execute it. Result? Same?
<br><br>This makes difference. Waiting for your reply.<br><br>Dinçer<br><br><div><span class="gmail_quote">2007/3/17, Simon Welch <<a href="mailto:simon.welch@gmail.com">simon.welch@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Please can someone help or point me in the direction of a log I can interrogate, I am using gammu to attempt to send sms notifications (command definition below, as detailed on gammu web site).  The nagios.log reports that the notification has been sent sucessfully but the message is never received, if I run the command manually the sms is received.  Any ideas?
<br><br>Details FC6 PPC, Gammu version 1.10.1 (compliled from source), Nagios 2.7 yum repository install.<br><br>define command{<br>       command_name    notify-by-sms-direct<br>       command_line    /usr/bin/printf "%b" "Svc:$SERVICEDESC$ ++Host:$HOSTALIAS$ ++ Addr:$HOSTADDRESS$ ++ State:$SERVICESTATE$ ++Date:$SHORTDATETIME$" | /usr/local/bin/gammu --sendsms TEXT $CONTACTPAGER$
<br>}<br><br>Thanks in advance<br><span class="sg"><br>Simon<br>
</span><br>-------------------------------------------------------------------------<br>Take Surveys. Earn Cash. Influence the Future of IT<br>Join SourceForge.net's Techsay panel and you'll get the chance to share your
<br>opinions on IT & business topics through brief surveys-and earn cash<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV" target="_blank">
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a><br>_______________________________________________<br>Nagios-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users
</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>