FW: Sending notifications via SMS+mobile phone

Sander Klein sander at pictura-dp.nl
Fri Mar 14 13:23:01 CET 2008


DD mailed to this list... but to be complete here is the mail:

---

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
---




-------------------------------------------------------------------------
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