Gone are the days when every sysadmin had to carry a pager because cell phones just didn't cut it. These days, SMS is just about as reliable in most environments and essentially free compared to the cost of a paging service and dealing with a 2nd device.
The hiccup, as nearly everyone knows now, is that you have to find a way to get your monitoring server to talk to your cell phone company -- and, honestly, you're cell phone company does not want to make this easy....they'll try to upgrade you to various unlimited SMS/messaging plans and then have an internet SMTP -> SMS gateway that fails constantly.
I've switched from provider to provider over the last 4-5 years and they are all the same. Alerts may be reliable for a few months on one or the other, but eventually there comes a time when you didn't get the call because the email -> SMS gateway was down, or worse -- delivers the message a day later.
So, screw the cell phone company, let's use Skype:
Steps I Used to Teach The Hobbit Monitor to Use Skype:
- Setup Hobbit in a Dedicated Linux Virtual Machine
- Ensure Hobbit is running under its own non-root userid (actually, no reason not to just use apache userid since hobbit and apache are going to share a great many files and the entire VM is dedicated to hobbit).
- Setup VM to automatically bootup in runlevel 5 and autostart a new gnome session under apache
- Install Skype for Linux and the Skype Command Line Tools at: http://www.oberle.org/blog/2007/06/11/sending-sms-with-skype-on-linux/
- Do not use the standard init system to startup hobbit. Instead, setup gnome to initiate the Skype Client followed by a hobbit restart at the start of each session. This will ensure that hobbit has full access to the X authentication environment which it needs to communicate with the X-windows skype client.
- Create a new script in /usr/local/bin owned by apache that executes the skype command line SMS send tool and passes it the phone number and BB environment variable for the error message itself.
- Follow the instructions to hobbit-alert.conf to tell hobbit under what condition it should send SMS alerts
- Make sure you setup a dedicated Skype account for the server, use skype out credit, and have it auto deposit another $10 into the account whenever it runs out of funds. Also, modify the Skype client settings to not accept any incoming calls/messages/etc.

Leave a comment