How to configure Nagios for audio alerts and mobile notifications

In a Network Operation Centre (NOC) environment, setting up alerts is extremely important. As one of the most popular NOC monitoring systems, Nagios features powerful alerting services. Alerts generated by Nagios can be sent out in various means, so that they can be acted upon immediately. Email notification is the most commonly used option.

This tutorial presents two other ways to send out Nagios alerts: (1) audio alerts via web browser, and (2) audio/vibration alerts via an Android app.

Nagios Checker - A Firefox Add-on

A small Mozilla Firefox add-on named Nagios Checker written by Petr Šimek can be used to gather information from Nagios, and generate audio alarms whenever a problem is detected. It is very easy to set up.

Requirements

  • Nagios Checker will gather information from a Nagios server every minute.
  • Nagios Checker will generate audio alarms only when there is a change in network
    health, i.e., alarms will not be produced for the same host over and over again.

Installation and Configuration

Nagios Checker can easily be obtained in the Firefox add-on menu. A simple search should do the trick.

The Add-on Bar must be enabled.

The add-on is configured to gather information from a Nagios server.

Nagios server IP/hostname, nagiosadmin user and password are set.

The path to the status.cgi script is located. The path to CGI directory would be:

  • Debian/Ubuntu: http://IP/nagios3/cgi-bin/
  • CentOS/RHEL: http://IP/nagios/cgi-bin/

The URL for status.cgi is manually defined as the process of locating it automatically is not always successful.

After exiting the dialog box with OK, the check interval is set.

By default, Nagios Checker will produce audio alarms over and over again with each check (every minute in this case) if at least one problem exists. This could be very annoying. Nagios Checker is tuned so that it generates alarms only if a new problem appears.

And now we are ready to use Nagios Checker with Firefox. It is a very useful tool in any NOC environment that has to monitor a lot of hosts.

aNag - An Android App for Nagios

aNag is an Android app that can be configured to gather information from a Nagios server, and provide alerts (audio and/or vibration) in Android phones. It is a lightweight, free, easy to configure software with no advertisements. It can be easily installed from the Google Play store.

After aNag has been downloaded and installed, configuring it is very easy. Pressing the menu button in the phone should give a panel containing 'settings'.

A new instance is created.

The parameters for the new instance are entered. The path to CGI directory would be:

  • Debian/Ubuntu: http://IP/nagios3/cgi-bin/
  • CentOS/RHEL: http://IP/nagios/cgi-bin/

aNag is highly customizable. The notification period, update interval and other parameters can be changed from the settings menu. One of the important things that can be configured would be specifying whether aNag should query a Nagios server if any data connection is available, or it should check only over Wi-Fi. This setting can be found under 'settings -> low level settings'.

At this point, we are ready to use aNag. It should generate alerts as needed. The app interface should contain all the necessary details.

Another useful feature of aNag is the ability to shut down the app and associated services while not in use. This frees up phone resources that can be used for other purposes. This feature can be found by tapping the menu button.

Hope this helps.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

The following two tabs change content below.
Sarmed Rahman is an IT professional in the Internet Industry in Bangladesh. He writes tutorial articles on technology every now and then from a belief that knowledge grows through sharing. During his free time, he loves gaming and spending time with his friends.
Your name can also be listed here. Write for us as a freelancer.

3 thoughts on “How to configure Nagios for audio alerts and mobile notifications

  1. We receive an annoying amount of email notifications, haven't done much about it, but it's better than not knowing. I also run aNag on my phone.

    • Well, based on your requirements, you could try tuning the check interval and recheck counter. Personally, we use different check intervals and also different recheck counter for servers, routers, switches, upstream and downstream.

Leave a comment

Your email address will not be published. Required fields are marked *