[collectd] Announcing Heymon, a Rails-based frontend for Collectd RRDs

Lindsay Holmwood lindsay at holmwood.id.au
Sat Feb 20 22:21:10 CET 2010

On 20 February 2010 09:00, Michael Poetters <michael at poetters.net> wrote:
> On Thu, 18 Feb 2010 16:14:02 -0700
> Brian Long <brian at dotspots.com> wrote:
>> [heymon announce]
> Hi Brian, hi list,
> looks really nice, but trying to install it under debian seems to be a pain.
> No luck at all till now.
> I've problems to get RubyRRDtool to compile, mostly because incompatibility
> with librrd . I'm just trying to port it to the current librrd version.
> (Older one's doesn't work at all either).
> My question is, why you don't use the original RRD gem delivered with librrd?
> Have you any tips to compile or install RubyRRDtool?

Welcome to my world of pain. Getting RRDtool playing with Ruby is a
royal pain in the arse, and something I've spent countless hours
trying to make work correctly.

I tentatively took over maintainership of the RubyRRDtool gem in
January, mainly because I was having so many problems with it in
Visage[0], and nobody was actively maintaining it. As part of taking
it over I renamed the project to Errand[1], but I have yet to announce
any of this yet. :-)

I've spent the last 2 days debugging an issue with Errand/RubyRRDtool
where it won't compile against RRDtool 1.2, and I've come to the
conclusion that the current RubyGem bridge is more trouble than its

Every 6 months or so there are various bugs that crop up when
compiling the bindings against the latest RRDtool, and invariably a
patch pops up that fixes it within a few weeks. Unfortunately the
patch normally breaks something somewhere else, causing lots of
headaches and tail chasing.

My recommendation for developers using RRDtool in Ruby is this:

*Don't* use RubyRRDtool or Errand - get the user to install their
distribution's RRDtool packages for Ruby (librrd-ruby on Debian,
ruby-rrdtool on Redhat), and deal with that library directly.

The downside to this is that users who want to run your app using REE,
JRuby, MacRuby, or Rubinius are shit out of luck. Also, if the user is
using an operating system that doesn't have the RRDtool Ruby bindings
packaged, they will have to install and compile them themselves.

I'm toying with re-writing Errand from the ground up using
ruby-ffi[2], which would mostly mitigate this problem. ruby-ffi lets
you load dynamic libraries and bind + call functions from within pure
Ruby code. This would mean the user only needs to have rrdtool
installed, and any Ruby code on any runtime on any Unix operating
system would be able to talk to it.

Hope that helps!

[0] http://auxesis.github.com/visage
[1] http://github.com/auxesis/rubyrrdtool
[2] http://github.com/ffi/ffi

w: http://holmwood.id.au/~lindsay/
t: @auxesis

More information about the collectd mailing list