Google+ Badge

Tuesday, February 3, 2015

Getting gmond metrics into InfluxDB

I'm a huge fan of InfluxDB + Grafana. InfluxDB is on a good path toward making metrics not suck, and Grafana has a great vision for interactive and exceedingly scriptable dashboards.

One problem I've run into recently is that while I can get all kinds of cool custom metrics into InfluxDB without much struggle, I don't have a tool that will spit out nice system metrics into InfluxDB.

My favorite tool for getting useful system metrics so far has been Ganglia's gmond. It gives some decent disk and memory data, but my favorite bit is the built-in CPU % utilization and network bytes in/out metrics. You'd be surprised how few tools actually give that information out-of-the-box.

However, the back-end I don't really want to use for gmond is Ganglia. What it does, it does exceedingly well. What I want it to do, it does terribly. So I either needed to adjust my expectations, or find some way to get gmond metrics into InfluxDB. Turns out there were tools available to get data from most other monitoring and metrics tools into InfluxDB (collectd, statsd, fluentd, graphite, etc) but nothing that would work with gmond.

Now, you can make gmetad output data in Graphite format and point it at InfluxDB's Graphite input plugin. I don't much care for that approach, for a few reasons:

  • it forces an awkward (and generally performance-hindering) data layout in InfluxDB
  • it requires you to run gmetad, which feels a bit heavy when it would just act as a proxy
  • it introduces more layers when I'd much rather simplify things

I'd much rather have some simple tool that polls gmond and puts the metrics into InfluxDB in a sane way.

So, I built one. Get it at:

It's not *quite* where I want it to be yet, but it should be of some use right now. I've listed some enhancements I want to make in the Readme.

My thinking behind this tool (and any others I might build) is that, as an infrastructure tool, it should be easy to get started with, easy to automate once you've got the hang of it, and easy to forget about once you've handed if off to your config management tools.

To that end, if any one of those qualities is not present, consider it a bug and file an issue on Github - or send me a pull request, I love those things.

Happy graphing!