Sun, 03 Jun 2007
Extending the Nagios CGIs - Discouraging Casual Commiters
While working on my Nagios display tools I wanted to modify our existing
Nagios deployments to easily link the information in but after a quick
dig I discovered that something was very wrong - the Nagios CGIs are
written in C.
While shell and perl are my current languages of choice I can write (a very little and very basic) C but the idea of customising webpages in it, especially pages this critical to the company, stopped me in my tracks. While I can understand using the language you're most familiar with when writing software if you want to attract contributers you need to match the language to the task. If the Nagios front ends had been written in any of the dynamic languages I'd have spent some time to understand and hopefully add to them - but not C, it's the wrong level of language for this kind of work.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2007/06/03 11:51 | /misctech | Permanent link to this entry | This entry + same date
Nagios - Simple Trender
Continuing the release of my Nagios code - here's my Nagios
Simple Trender. It parses Nagios logs and builds a horizontal barchart
for host outages, service warnings and criticals. It's nothing fancy (and
the results are a little unpretty) but it does make the attention seeking
services and hosts very easy to find.
While the tool isn't that technically complex I've found it useful in justifying my time on certain parts of the infrastructure. Being able to show how bad NTP is for example (we had 216 NTP sync problems last month, this month we had 36; and most of those are one machine with a bad clock) on a very simple chart makes it easier to get buy in from above. And next month you can show them how much of a positive impact the work had.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2007/06/03 11:29 | /tools/commandline | Permanent link to this entry | This entry + same date
The Nagios Tag Cloud
We use the Nagios monitoring system
at work (in fact we use four installs of it for physically isolated
networks) and while it's damn useful (and service checks are easy to
create or extend) it's a little lacking in higher level trending and
visualisation tools. Well, at least the very old version we run suffers
from this.
Thankfully I work for a company that invests time in its core tools. Over the last couple of hackdays I've written two small scripts for parsing Nagios logfiles and presenting the information in a different, slightly more grouped way. The first of these is the Nagios TagCloud - which has a very descriptive name :)
When invoked (I typically use nagiosclouds.pl /log/files/*.log >
/webdir/nagios_tagcloud.html from a cronjob) it'll run through the log
files and produce a HTML page containing 3 tag clouds, one for host
outages, one for service warnings and one for service criticals. Tag clouds
don't suit everyones work style but I came away from running ours with a
couple of action points so I think they're useful enough to glance at once
a month.
I should note the perl module that generates the tag cloud is Leon Brocards HTML::TagCloud and the CSS was graciously given to me by Alex Monney after he burned his eyes looking at my first version.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2007/06/03 11:08 | /tools/commandline | Permanent link to this entry | This entry + same date
The Perk of $HOME - .bash_logout
It's not a well kept secret but I'm still surprised by how many people have
never encountered .bash_logout. Its purpose is pretty simple,
if you use the BASH shell it'll be executed when you log out (see, a well
named file!)
So what's it for? Well, I use mine to invalidate any sudo
sessions I've got open (sudo -k), clear the
screen -in case it's a local session - and nuke a history file or two.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2007/06/03 10:47 | /tools/commandline | Permanent link to this entry | This entry + same date

