Nagios in your Vista sidebar


Nagios is as I have mentioned many times before a useful monitoring tool that you can use to give yourself and your team the heads up about problems as soon as they are detected. The provision and presentation of information in Nagios is not as slick (at the moment) as some of the competition but todays tip relates to getting the current status of Nagios into your Windows Vista or Windows 7 sidebar.

First some plumbing required. You will need the NagStatus script from http://nagstatus.com/ – this needs to be placed in the same directory as the other cgi scripts on your Nagios server – in my case the nagios/sbin directory and be made executable. On Ubuntu I found a missing dependency which I installed using

apt-get install libxml-libxml-perl

You should then be able to test by running the following command in the sbin directory.

./nagxmlstatus.cgi -f ../var/status.dat -n all -e all
 

 

if you get the stream of output representing the xml you are nearly there. Next is to test from a web browser

http://serveripaddress/nagios/cgi-bin/nagxmlstatus.cgi?node=all&elem=all

shows my nagios setup and the url required to get xml rendered to IE8 in this case. If you don’t get what you are expecting edit the .cgi file and check that you entered the location of the status.dat file !!

When you do get the output now you can focus on just getting the gadget installed and configured. Once downloaded and in your sidebar – the final details need to be added. You will have to enter the location of the Nagios Web UI -> this will be in the form http://serverip/nagios/ and then the XML status provider URL which is the full path to the cgi script for example 

http://serveripaddress/nagios/cgi-bin/nagxmlstatus.cgi

Enter the username and password you normally use to access Nagios and hopefully you’ll get the status of the nagios monitored hosts displayed. Clicking on the status of the hosts causes a flyout to appear with the detail of the issues listed.

 

So there you have it – Nagios in your Windows sidebar…..

Note – there are a few things I would change – for example excluding Hosts in scheduled downtime and allowing links directly to the Nagios main and summary pages – but these may well appear in new releases – I’ll keep you posted.