one inch frame
the personal site of eric a. Farris

New Project: netmon

Over the last several weeks I’ve been looking at various projects on freshmeat that tackle the problem of pinging hosts and keeping track of their status, doing SNMP monitoring, graphing (like RRDTool) and such. I had Nagios running here a while back (Clayton will no doubt remember the flurry of mails he would get from it); but Nagios is just way too complicated for what I need.

And, after looking through several, I’ve dismissed them all. Cacti seemed to be the most promising of the lot, but it’s got pretty lame host up/down status, doesn’t do alerting at all, and had some pretty serious bugs. A lot of people use MRTG but I just can’t see using a cgi-bin application that doesn’t use a database these days. Just a personal preference. And, while the front-ends for MRTG may be many and varied, they all appear, well, sub-optimal.

So, I’ve done what any fool that knows how to write a couple lines of PHP would do: I’ve written my own.

The project is tentatively called netmon, and I’ve got enough of it done that I’m now using it here at the Lab to monitor hosts and alert me of their status. Some of the features it has at this point are:

  • very simple. Put in the name of a host, and you’re done. It will start monitoring that host and keep you advised of its status.
  • PHP+MySQL. Doesn’t require the use of a ping utility on the host. This is both a feature and a detriment, as the php-based ping requires root access. This is only necessary during the status check, so it’s run by cron anyway, but I still don’t like it. Hopefully I can find a decent 100% php ping that doesn’t require root-level access.
  • Flexible notifications. While it’s limited (today) to just one email recipient, notifications can be turned on and off on a per host, as well as per event basis. So, you can get host_down notifications for some machines but not others. They’ll still be events in the log, but won’t necessarily trigger emails.
  • blocks” in the web display that allows an at-a-glance look at which machines are down, and unacknowledged events.
  • tableless site design, CSS, etc., etc., etc.

It is extremely simple at this point, but functioning. I plan on finding a good name for it (netmon is already in the Freshmeat trove as a project), cleaning up the code a bit, and releasing it on Freshmeat this week.

There are a lot more features planned for it:

  • SNMP collection. Gee, that’s why I started this, wasn’t it?
  • Per-service, as well as per-host, pinging.
  • Group-based notifications and status displays.
  • Graphing of statistics, via RRDtool.
  • Drupal module.

Yes, I plan on turning this into a Drupal module at the end. I’m using Drupal now as a personal wiki, keeping notes on machines and events, so it makes sense and would also be very cool to have status as part of the system. But that is a long way off. Some of the other features like access control will wait until the project is integrated into Drupal.

-->