Gnokki Issues

Morris, Patrick patrick.morris at hp.com
Wed Sep 23 16:19:24 CEST 2009


Martyn wrote:
>
> Hi all, I have just installed Gnokii for my SMS alerts and having a 
> few issues, could you check my config and let me know if you see any 
> errors or any reason why I can not send SMS alerts.
>
> I can send SMS via command line in the following way:
>
> echo "Hello World" | gnokii --sendsms +123456789 –r
>
> Here is my Nagios Command:
>
> /usr/bin/printf "%.120s" "ALERT\n\nNotification Type:  
> $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
> $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: 
> $SERVICESTATE$\n\nDate/Time:  $LONGDATETIME$\n\nAdditional 
> Info:\n\n$SERVICEOUTPUT$ ##" | gnokii --sendsms "** $NOTIFICATIONTYPE$ 
> alert - $HOSTALIAS$/$SERVICEDESC$ is$SERVICESTATE$ **" $CONTACTEMAIL$ -r
>
So, you say this works:

echo "[single line message]" | gnokii --sendsms [phone number] -r

And Nagios is configured to do:

printf "[multi-line message]" | gnokii -- sendsms "[header]" [email] -r

I know nothing about gnokii, but if the latter doesn't work,  look at 
the differences between your test case and what you've told Nagios to 
do. The most likely cause of the breakage, if I were to guess, would be 
the header part.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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