Sending notifications via SMS+mobile phone

DD david at netsafe.cz
Fri Mar 14 11:53:04 CET 2008


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

----- Original Message ----- 
From: "Sander Klein" <sander at pictura-dp.nl>
To: "Meylikhov" <rage_q3 at mail.ru>
Cc: <nagios-users at lists.sourceforge.net>
Sent: Friday, March 14, 2008 11:38 AM
Subject: Re: [Nagios-users] Sending notifications via SMS+mobile phone


Hi,

I use the siemens tc35i gsm modem and think it's great. Just hook it up
to your COM port, install smstool (which is in debian) create the
configfile, make a script to send sms and go....

It's really easy.

Greets,

Sander

Meylikhov wrote:
>
> Hello, everybody!
>
> Can anyone assist me in solving the following task: I need nagios to
> send SMS via mobile phone connected to COM port. Are there are such
> possibilities in nagios and are there any plugins that support sending
> sms via mobile phone? I found only one plugin (NAGIOSMS:
> http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1[p_view]=619
> )that is currently supports sending notifications via mobile phone but
> I even can’t imagine how to connect mobile phone to my Linux Debian
> 4.0 server (2.6.18-6-686)… Maybe someone already has configured
> notifications send via mobile phone and can suggest me what mobile
> phone to buy? I also need any help (suggestions,links, documentation,
> etc) in connecting mobile phone to my Linux Debian 4.0 server.
>
> My system:
>
> Nagios server: Linux Debian 4.0 server 2.6.18-6-686
>
> Nagios: nagios-3.0b5
>
> Nagios plugins: nagios-plugins-1.4.11
>
> NRPE: nrpe-2.10
>
> Thank you!
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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