Saturday, September 05, 2009

Talk Perl To Google Voice

Send System Alert SMS via Google Voice
I have quite a bunch of servers under my command ranging from VoIP IP Telephony servers, to Oracle database servers. The permanently alive ones has monitoring services connected and informs us via email, SMS and simple phone call.
But half of the above severs are experimental at any given time and assigning a monitoring service, either paid or free, could wake up your colleagues in the middle of the night, if you are playing around with the servers. Even yourself might be falsly alarmed if you phone goes beep in a quite night, when you stop some srvice on a remote server.
I found a perl script that can send SMS messages via Google Voice. So now I have this script on my experimental severs (and on a central watchdog server for permanent servers) that alerts me via SMS through Google Voice.
The script was written by a Trixter, (Bret McDanel trixter AT 0xdecafbad.com) and some contributors whom he credits. The script is written in perl and named googlevoice.pl.
If any of my vital services go down, the server itself or the watchdog server can send an SMS message to 123-456-7890 via the script

./googlevoice.pl sms 1234567890 Alert Server XYZ lost a vital service
 In addition to sending SMS, the script can also place and cancel calls;
./googlevoice.pl call 1234567890
./googlevoice.pl call 1234567890 9012345678
or 
         ./googlevoice.pl cancel

You will find the script and Trixter at 0xdecafbad.com or download it directly. But visiting the site will give more infromation and you can join the conversation too!

0 comments:

Blog Widget by LinkWithin