DevOps Zone is brought to you in partnership with:

Spike Morelli has over a decade of experience as an engineer and is now a devops consultant and proud startup owner. After years focused on technical challenges like automation, monitoring, scalability and cloud, Spike took an unexpected turn and while still in engineering he started working with people rather than machines, coaching engineers and helping teams going from good to great. Spike is a DZone MVB and is not an employee of DZone and has posted 10 posts at DZone. You can read more from them at their website. View Full User Profile

Graphite-Web Puppet Module and Patch for Collectd’s RRD Support

06.22.2012
| 5307 views |
  • submit to reddit
If you’re running collectd chances are you’ve struggled or are struggling with the web frontend. The one shipped with collectd has some limitations and most people tend to use 3rd party solutions like Visage. Having looked at that and another few I wasn’t really happy with any of them due to dependencies or simple lack of functionalities. In the meantime I finally got some time to play with Graphite, which is a relatively new metrics collection system with some interesting properties. It has its own storage system called whisper and comes with a snazzy web frontend which is also compatible with rrdtools’s format. Being all written in python with the frontend based on django it was an easy choice for me.


Problems with RRD support and packaging

RRD support is buggy in the latest stable release (0.9.8), but a patch has been merged in trunk that fixes all known problems. The puppet module ships with it and applies it as part of the installation.

There currently aren’t any official rpm or debian packages so the installation is done from sources and the puppet module is for the most a bunch of execs. This is not very elegant, but it does the job for the time being and I’ve abstracted things enough that whenever packages become available it should be just a matter or swapping some resources out.


Some manual steps are still needed

A few steps still need to happen manually as automation would require more work than I have time for at the moment, but I hope to get to them later this month. The first problem is with creating the database and running django syncdb command. This expects user interaction to create an admin user. It is possible to sort this out and make the process unattended, but there’s a certain amount of work I didn’t have the time to do. Second you need to make the RRDs available to graphite yourself. In my case this means using lndir to create symlinks from graphite’s rrd directory to collectd’s one and setting followsymlink in apache for that dir.


Closing notes

This module only deals with the web frontend and whisper as a required dependency, there’s nothing in about carbon as I’m not running graphite for collection yet. Sooner or later I’m gonna do that so watch this space (or the git repo) if you’re interested in updates. All the code is available from my repository on github

Credit to Youdevise for allowing me to release this code that has been developed while consulting for them.
Published at DZone with permission of Spike Morelli, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)