Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

notifications via SMS



[Posted to the BBLISA list. Might be of interest to BLUers.]

Ryan Pugatch wrote:
> Here is a summary of solutions mentioned in response to my posting to 
> BBLISA and SAGE:
> 
> - Dean Anderson mentions this article: 
> http://www.linuxjournal.com/files/linuxjournal.com/ufiles/LJ191_UsingSMSforNagios.pdf 
> which involves using an SMS device to interface with Nagios.  The 
> MultiTech device in the article is mentioned by Daniel Rich.

As I recall (it's been a while since I read that article), the author
mentions having considered hacking together an approach using a standard
cell phone, but decided it wouldn't provide the physical robustness of
the MultiTech cell modem (which can be properly mounted, and is designed
for enterprise reliability).

That sounds like an accurate assessment, but the budget solution might
still come in handy in some situations. Consider, for example, that if
the software and compatible phone hardware has already been figured out,
you could add out-of-band notifications for the cost of a phone ($20)
and pre-paid plan ($100/yr). (Although as I recall the "telemetry" phone
service the author purchased only cost $120/year. So really the savings
is just in convenience (phone and pre-paid service can be bought
anywhere) and hardware. It'd be more of a bargain if you could put
multiple phones/SIMs on a single pre-paid plan.)

Has anyone tried it?

Looks like reference material is pretty easy to find. In addition to the
article mentioned earlier in this thread:
PDF: http://usenix.org/publications/login/2009-02/pdfs/josephsen.pdf

A Freshmeat.net search on SMS turns up several projects that all use
gnokii as their underlying interface to the cell phone:

http://en.wikipedia.org/wiki/Gnokii

   Gnokii is a suite of programs for communicating with mobile phones. It
   was initially only available for Nokia mobile phones, but later
   extended to support others. It is available for Linux, BSD unix,
   Windows and Mac OS X and as source code.

gnokii was actually pretty easy to setup on my Ubuntu laptop after about
30 minutes of mailing list mining and wiki reading. First I peered my
Nokia 2760 via Bluetooth with the laptop. (Using a USB cable is most
likely far more reliable.) I installed gnokii:
% sudo aptitude install gnokii-cli

Copied over the template config:
% cp /etc/gnokiirc .gnokiirc

Then I ran a command to determine my phone's hardware address:

% hcitool scan
Scanning ...
	00:1F:5D:38:37:3F	Nokia 2760

Then edited .gnokiirc to contain:

[global]
port = 00:1F:5D:38:37:3F
model = 6510
connection = bluetooth

(leaving everything else as its default.)

Tested connectivity:
% gnokii --identify
GNOKII Version 0.6.26
IMEI         : 011796000826966
Manufacturer : Nokia
Model        : RM-391
Product name : RM-391
Revision     : V 06.83

Sent an SMS (using text dialogs):
% sendsms

Or this works too:
% echo "message" | gnokii --sendsms 6175551212
GNOKII Version 0.6.26
Send succeeded!


gnokii has a library interface and Perl bindings, so you can more 
tightly integrate it with your network/system monitoring tools.

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org