SMS notification with gammu

Dinçer Kavraal dkavraal at yahoo.com
Sun Mar 18 04:15:38 CET 2007


Hi Simon,
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, ...).
Thus, see the difference.

First of all, let it write into a file. For instance, change the command
like,
echo '/usr/bin/printf "%b" "Svc:$SERVICEDESC$ ++Host:$HOSTALIAS$ ++
Addr:$HOSTADDRESS$ ++ State:$SERVICESTATE$ ++Date:$SHORTDATETIME$" |
/usr/local/bin/gammu --sendsms TEXT $CONTACTPAGER$' >> /tmp/someTempFile

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?

This makes difference. Waiting for your reply.

Dinçer

2007/3/17, Simon Welch <simon.welch at gmail.com>:
>
> 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?
>
> Details FC6 PPC, Gammu version 1.10.1 (compliled from source), Nagios 2.7yum repository install.
>
> define command{
>        command_name    notify-by-sms-direct
>        command_line    /usr/bin/printf "%b" "Svc:$SERVICEDESC$
> ++Host:$HOSTALIAS$ ++ Addr:$HOSTADDRESS$ ++ State:$SERVICESTATE$
> ++Date:$SHORTDATETIME$" | /usr/local/bin/gammu --sendsms TEXT $CONTACTPAGER$
>
> }
>
> Thanks in advance
>
> Simon
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070318/b53500bc/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list