Nagios Alert thru SMS

Ilya Meylikhov rage_q3 at mail.ru
Wed May 7 10:24:36 CEST 2008


Bulik, please keep it on the mailing list.

You can achieve your aim using several ways:

 

1)      Peter Edmond's solution:

 

"I use gnokii. I have used a Telular GSM SX5D and currently use an Easygate
analog fixed cellular terminal (via serial port). Gnokii is avaialble in
Debian Etch and supports a lot of mobile phones. Check
<http://wiki.gnokii.org/index.php/Config>
http://wiki.gnokii.org/index.php/Config for a partial list of supported
phones. The atgen driver in gnokii supports lots of phones.

 

/etc/gnokiirc looks like this

 

[global]

port = /dev/ttyS0

model = AT

initlength = default

connection = serial

use_locking = yes

serial_baudrate = 19200

smsc_timeout = 10

[gnokiid]

bindir = /usr/sbin/

[connect_script]

TELEPHONE = 12345678

[disconnect_script]

[logging]

debug = on

rlpdebug = off

xdebug = off

 

 

 

Notify command for service notifications looks like this

 

echo -e
"<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGDATETIME
$"

|gnokii --sendsms $CONTACTPAGER$ >>

/usr/local/groundwork/nagios/var/gnokii.log 2>&1

 

For host notifications this does the job

 

echo -e
"<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$HOSTOUTPUT$\n$LONGDATETIME$"

|gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log

2>&1

 

Peter Edmonds"

 

 

2)      DD's solution:

 

"Yeah i'm using same siemens gsm terminals and it's working great. But they
are out of production now, so u will have to get them some on ebay or
something similar.

Here is little bash script /usr/local/bin/sendsms which will send sms to
specified number:

-----

#!/bin/bash

 

SMSCMD=/usr/bin/scmxx

 

if [ -z "$2" ];then

  echo "Usage: $0 <number> <text>"

  exit 0

fi

 

$SMSCMD --device=/dev/ttyS0 --send --sms --direct -q --number=$1 --text="$2"

-----

 

/usr/bin/scmxx is binary from package scmxx (debian package) for
communitacion with siemens phones.

 

Then i have notify command defined in nagios. For services it looks like

this:

/usr/local/bin/sendsms $CONTACTPAGER$ "Service: $SERVICEDESC$ Host:

$HOSTNAME$ State: $SERVICESTATE$ Notify: $NOTIFICATIONTYPE$"

 

for hosts:

/usr/local/bin/sendsms $CONTACTPAGER$ "Host: $HOSTNAME$ State: $HOSTSTATE$

Notify: $NOTIFICATIONTYPE$"

 

And for each contact has defined it's mobile phone number as pager.

 

That's all.

 

Cheers,

DD

---"

 

As for me I use Peter Edmond's solution (gnokii).

 

Best regards,

                Ilya.

 

 

 

 

 

From: ninjai [mailto:bulik_en at yahoo.com] 
Sent: Wednesday, May 07, 2008 12:15 PM
To: Ilya Meylikhov
Subject: Re: [Nagios-users] Nagios Alert thru SMS

 

Hi Ilya,

I have GSM modem brand Falcom.

thanks for your prompt response

regards 

bulik

----- Original Message ----
From: Ilya Meylikhov <rage_q3 at mail.ru>
To: ninjai <bulik_en at yahoo.com>; nagios-users at lists.sourceforge.net
Sent: Wednesday, May 7, 2008 4:13:09 PM
Subject: RE: [Nagios-users] Nagios Alert thru SMS

Hello!

You want to use SMS gateway or you have a GSM modem?

 

Best regards,

                               Ilya.

 

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of ninjai
Sent: Wednesday, May 07, 2008 11:46 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Nagios Alert thru SMS

 

Hi All,

Would like to ask some help regarding nagios alert thru SMS. Is there any
plugin that I can integrate to my nagios? 

Please help.

Thanks and Regards,

bulik

 

  _____  

Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
now.
<http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62sR8H
DtDypao8Wcj9tAcJ%20> 

 

  _____  

Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
<http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62sR8H
DtDypao8Wcj9tAcJ%20>  it now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080507/def7e980/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-------------- 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