For awhile, I’ve been using Shawn Sterling’s Graphios. It’s a neat little utility for forwarding performance data from Nagios/Icinga to Graphite. It had a few warts, though, and I wanted to take the opportunity to learn event-based programming using Python/gevent, so I’ve gone ahead and developed Metricinga, my own approach to the same problem.

Metricinga supports the following:

  1. Support for running as a daemon
  2. Directory watches using inotify*
  3. Automatic reconnection to Graphite in the event of a send failure
  4. Continued parsing of performance data files while Graphite server is unreachable

*Metricinga actually uses a priority queue for metrics parsing, and will submit newly-written files before processing old ones in the spool directory. This ensures that if for some reason you end up with a giant spool full of Nagios performance data, your most recent (and most important) operations metrics will end up in Graphite before your historical data. Yay! But if you’re not running on a Linux system, or otherwise can’t use inotify, don’t worry. Metricinga will poll the spool every 60 seconds instead!

Metricinga does not yet support the following:

  1. Nagios performance data names containing escaped single quotes (”)

The following additional features are planned:

  1. Actual documentation
  2. Init script and RPM package
  3. Better shutdown handling
  4. Forwarding to metrics receivers other than Graphite (OpenTSDB, statsd, MongoDB, etc.)

Note that if you’re an existing Graphios user, Metricinga is a little more stringent with its performance data format checking, and you might have some data not getting sent over if plugins output incorrectly-formatted performance data (as Nagios::Plugin does).

Link: Metricinga on GitHub

More updates to follow in the next few days.