HELP SENDING SMS

Eduardo Barreto lecb79 at gmail.com
Thu Aug 20 23:23:31 CEST 2009


Hi All,

Does anyone could help on this one? The thing is, I've connected my monitor
(nagios) with a gsm modem through serial port and created a script to send
sms to notify manager of status from some hosts and services. The script
access kermit and from it sends the message, follow below the script:

(-------------------------SCRIPT SMS ---------------------------)
#!/usr/bin/kermit +
#.no := \%1
#.msg := \%2
set line /dev/ttyS0
set carrier-watch off
set speed 9600
output at\13
wait 2
output at+cmgf=1\13
wait 2
output at+cmgs=\%1 \13
wait 2
output \%2 \26
exit
(-------------------------SCRIPT SMS ---------------------------)

I've called this script as sms, put it on this path (/usr/local/nagios/sms),
on manual way I just need to do like that /usr/local/nagios/sms 'mobile
phone'  ' text message ', the script works just nice, after that test, the
next step was to setting it in Nagios
(/usr/local/nagios/etc/objects/command.cfg)

define command{
    command_name notify-host-by-sms
    command_line /usr/local/nagios/sms $PAGER$ "Host:$HOSTNAME$ -
State:$HOSTSTATE$"
          }

define command{
    command_name notify-by-sms
    command_line /usr/local/nagios/sms $PAGER$ "Host:$HOSTNAME$ -
State:$SERVICEDESC$ - State:$SERVICESTATE$'
          }

After set it, looked to at the Nagios log and it advise me that some
notifications are been sending through sms but I dont received it,


Need help

Thanks in advance

Eduardo Barreto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090820/ef553dd0/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- 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