sms alert using gnokii

Shane_Seidel at gwf.com.au Shane_Seidel at gwf.com.au
Thu Mar 6 08:40:13 CET 2003





Bernie,

I have SMS working on RH7.3, Nagios 1.0 using Nokia 5110, Gnokii Version 0.3.3,
Telstra GSM (Australia)

Some key points to remember:- if the gnokii command runs from root ok then su
nagios and try the command. If the command now fails permissions are the clue.

Make sure nagios can write to the port eg. ttys0 in Red Hat
Make sure nagios is a member of the tty group
Make sure nagios is a member of the uucp group ( not sure of the correlation but
have found this to be the case with other devices connected to the comm port eg
Temp Trax digital thermometer)

Lastly here is the command I use, note the +61 (Aust code), no smsc and no
switches I have seen "-C0 2" inserted before >/dev/null but this displays the
message on the phone without saving to the inbox
command[notify-by-sms]=/usr/bin/printf "$HOSTNAME$ - $SERVICEDESC$ is
$SERVICESTATE$" | /usr/bin/gnokii --sendsms +61408XXXXXX >/dev/null

Thanks to Pia from Linux Australia for helping me nut this out and good luck!



>>As you do not describe what errors you get, it is a bit difficult to provide


**********************************************************************************************************************************************
This email and its attachments are confidential subject to copyright and may be legally privileged. If they have come to 
you in error you should take no action based upon the contents nor should you copy or show them to anyone. Please 
delete the email and its attachments and inform administrators at gwf.com.au
Any views or opinions expressed are those of the author and do not necessarily represent those of George Weston Foods 
Ltd.
Security: Internet email is not a completely secure medium, please note this when considering the content of your message.
Viruses: We take precautions to ensure email is free of viruses but cannot guarantee this. Accordingly we advise
scanning all email and attachments
*********************************************************************************************************************************************

-------------- next part --------------

?>>an exact answer.
>>
?>>The advise I got when setting this up about 6 months ago, was to use some
?>>form of gateway between Nagios and Gnokii.
?>>Gnokii needs some kind of queing mechanism, otherwise it might choke when
?>>sending multiple notifications.

?>>I am using Alamin (www.alamin.org). It was somewhat difficult to set up, but
?>>runs fine. I can't find my notes about the installation, but I remember this
?>>has been on the list in the past.

?>>You should also check the FAQ at:


?>>http://www.nagios.org/faqs/viewfaq.php?faq_id=65&expand=false&showdesc=true

?>>/Allan


?>>-----Oprindelig meddelelse-----
?>>Fra: bernie liwanag [mailto:bliwanag at ya...]
?>>Sendt: 5. marts 2003 06:54
?>>Til: nagios-users at li...
?>>Emne: [Nagios-users] sms alert using gnokii


?>>Hi to all!

>> How can I make gnokii works on my nagios.I have my
?>>gnokii running using a command prompt. I can send and
?>>eceived a text message using the command :

?>># /usr/local/sbin/gnokii --sendsms <cell phone #>


?>>- Here is my sample conifiguration in contacts.cfg
?>>file
....................................

?>>Can someone tells me what wrong with my config?

||
||
||

>>Thanks a lot to all!

?>>Bernie


More information about the Users mailing list