Nagmap: An awesome addon for Nagios and Icinga

Overview

Nagios is one of the best open source IT infrastructure monitoring system available in market. The thing that makes it so powerful are the addons that can enhance its capabilities and give it some teeth. One such addon which is awesome in my view and one of the best I have seen recently is the Nagmap addon. It uses map from google map api version 3, and you don’t need a key for it. The installation is easy and you only need to know about latitude and longitude of the places you show up on the map (you can use Google to get those).

Nagmap: An awesome addon for Nagios and Icinga

Next edit config.php file under the nagmap directory and set the following parameters according to your environment. Set nagmap_map_center parameter according your central area, I am setting this to India where most of my servers currently reside. If you do not know the path of status file, open the nagios configuration file, it is defined somewhere in this file.

Set the parameters.

Open the status.php file in an editor of choice.

Set $fp parameter to the status.dat file

Next you just need to add a field to the host definition. Open the configuration file containing the host definition

Add notes latlag with the longitude and latitude of your host.

Restart nagios and point your browser to

http://ip-address/nagmap/index.php

If you have parent child relation between the hosts as shown above, you will see lines connecting your servers. You can remove the line by removing parents in the host definition. The line only indicate your network topology.

nagmap 300x176 Nagmap: An awesome addon for Nagios and Icinga