Nagios alerts by telephone?

I have a couple of nagios servers that currently alert me via SMS and email, but I'd like to add outgoing calls to that. The ideal solution would have the nagios machines call my cellphone and play an mp3/wav across the call to let me know something is wrong. My only problem is that I'm not sure how to go about accomplishing this.

I suspect I may have to buy a PBX card to do it, but I was hoping that someone here had done something similar with a regular modem and off-the-shelf software. Any ideas or hints?


Asterisk is overkill - but would work without issue. Save some time and get a voice capable modem and use vgetty.

Here is a tutorial which shows an 11 line perl script for playing a message over an outbound call:

http://www.webreference.com/perl/tutorial/14/2.html


You should look into Asterisk, an open-source PBX

http://www.asterisk.org/

You might want to look at the pre-bundled distributions rather than starting from scratch, as Asterisk is quite configurable and can be daunting to the newcomer at a low level (much like Apache httpd).

To send the alerts you describe, I'd suggest using the spool file configuration. Build a dialplan that when invoked dials the appropriate number and plays the right file. Once that's working, you can drop files into an Asterisk directory which will cause that portion of your dialplan to be invoked. You can pass parameters and such in the spool files, so you wouldn't have to create each message from scratch - you could have it read out the server letter-by-letter or use the integration to several TTS engines to try to say the server name.

You will need outbound termination to get the call out onto the PSTN, but there are many providers of such services. Most offer pricing where you pay a small standing charge for the account and then a low (on the order of cents per minute) outbound call charge.

Hope that helps.


If you're still looking for a solution, you might want to take a look at PagerDuty. PagerDuty will collect alerts from any monitoring system that can send e-mails (including Nagios) and place phone calls and SMS messages to a list of people you provide. It also lets you build on-call schedules and escalation chains.

http://www.pagerduty.com

[Disclaimer: I'm one of the people working on PagerDuty, so I might be a tad biased :P]


Have a look at nagast. That will call you in case of issues and report the ack back to nagios. Also, it will create a call if the nagiosbox didn't ping (not icmp, but nagast-ping) for a certain time. https://github.com/tuxis-ie/nagast


I'm not sure about the dialing out bit, but I reckon you could use festival to do the text to voice synthesis part of it.

http://www.cstr.ed.ac.uk/projects/festival/