Getting More out of the Nagios Statusmap

The Nagios Statusmap is one of those features that gets a lot of attention when you first set up your monitoring server, but when looking back after a while most people notice that they don’t really use it at all.

When it comes to daily monitoring I never found it very useful, either, but it has always served one important purpose for me: when adding new hosts or networks the Statusmap reveals whether I got all my parent/child relationships right. And since I work in a dynamic and growing environment I add a lot of hosts on a regular basis.

There is one thing that always annoyed me when looking at the Statusmap: when you exclude certain host groups from the map, only the host icons for those hosts get removed, but the map still shows their status in green or red, and with over a hundred hosts it’s still very hard to identify individual hosts.

Today I stumbled across a patch for the Statusmap on the Nagios Exchange that addresses this very issue. It really excludes the hosts from the map, i.e. it is re-drawn as if the excluded hosts just didn’t exist.

Here’s an example:

original Statusmap (before the update)

improved Statusmap (after the update)

If you would like to update your Nagios install, proceed as follows. I’m assuming that you have built Nagios yourself. I have tested this with the most recent version of Nagios 3.2.3

Before you begin, cd to the cgi folder inside your Nagios source download folder, e.g. ~/downloads/nagios-3.2.3/cgi

curl "http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1807&cf_id=24" > statusmap.diff
patch statusmap.c statusmap.diff
make statusmap.cgi
cp statusmap.cgi /usr/local/nagios/sbin/
cd /usr/local/nagios/sbin/
chmod g+w statusmap.cgi
chown nagios:nagios statusmap.cgi

Tags: , ,

  1. Nice! Works great!

  2. Hello, I haved patched 3.2.3 statusmap.c and put in Nagios 3.3.1, but dont works good… if possible a patch for 3.3.1?

  3. Thanks for this.

    I patched my Nagios Core v3.5.0 system with this first: http://exchange.nagios.org/directory/Patches/Nagios-Core/Show-service-state-in-statusmap–2D-Nagios-3-2E3/details then I manually applied the patch from this page (was a bit laborious and I got stuck on a couple of points, but it works for me).

    I made a diff of the original 3.5.0 version & my newly patched file. It’ is available here: -

    statusmap.c.patch

Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>