wiki:rrdcached

Enabling rrdcached with munin

2.0 is fully rrdcached-aware, and you only need to uncommenting the rrdcached_socket line in munin.config on munin's side.

Permissions issues

You have to be extra careful when launching rrdcached, since the permission needed for the rrd socket are not obvious.

2 processes have to be able to read/write to the socket:

  • munin-update (to sends updates)
  • munin-cgi-graph (to ask for flushs )

So, the easiest way is to have create the socket root:rrdcached 660, and have the munin and www-data users belonging to the rrdcached group. The options to do that are -s rrdcached -m 660. These have to be put before the -l one, since you can open several sockets with different ACL.

Debian's default configuration for rrdcached runs rrdcached as root and restricts it to /var/lib/rrdcached/db. You need to modify this for -b /var/lib/munin.

Additionally, rrdcached needs to be able to write to the rrd files, and munin-update needs to be able to create new rrd files. The following setup has been verified to work:

  • directories: root:munin 775
  • files: root:munin 664

There might be a problem with new graphs: New rrd files are created by munin-update as munin:munin 600 and need manual intervention to root:muni 664 so that they can be updated. Not sure whether this is an error in my installation or a bug.

Options for lowering I/O

Now, per default, the rrdcached daemon flushes spooled data every 5 min. As that's not very useful for us, we'd change the flushing intervals to :

  • -w 1800 : Data has to be written after a 30 min wait.
  • -z 1800 : Data writes is delayed by a random factor between 0 and 30 min (should be lower than -w)
  • -f 3600 : Every hour, garbage collecting on missed flushed.

Monitoring rrdcached

http://munin-monitoring.org/browser/trunk/plugins/node.d.debug/rrdcached.in is a munin plugin wich will monitor rrdcached. You need to configure your munin-node to run this plugin as group rrdcached.

Last modified at 2012-03-12T13:32:47+01:00 Last modified on 2012-03-12T13:32:47+01:00