Out of the box, Nagios can only alert you by email when a service fails, but these email messages can be easily overlooked. A call is more sustainable.
It's difficult to ignore a ringing phone, so it makes sense to teach Nagios how to make phone calls. You can do this with a combination of Nagios [1] and Asterisk [2]. Configuring Asterisk is less than trivial, and setting up a complete PBX just for monitoring is slightly over the top; however, you can sign up for a SIP (Session Initiation Protocol) account for not too much money, add a CLI SIP client and a simple shell script, and do the same thing with less overhead (Figure 1).
Figure 1: As you can see, the command that picks up the message – here, an email script – works.
First, the SIP account; you could opt for any VoIP provider. Setting up an account is trivial: Just complete the online form, wait for the confirmation email, and set up your account.
A Matching SIP Client
The process for the CLI SIP client is slightly more complex. Most VoIP clients are designed for the desktop and cannot be scripted at all, or at least not very well. Of the available clients, PJSUA [3] turns out to be the best choice. PJSUA is the PJSIP reference implementation, and it
...
Use Express-Checkout link below to read the full article (PDF).
Why spam yourself with useless notifications every time a script completes successfully? You can use Nagios to screen the notices and just send the ones that need action.
A lack of information about your infrastructure can result in faulty system configuration and other difficulties. Automatic discovery of all hosts and services would seem to be the best solution – but can it also prove itself in practice?