[collectd] Aggregating sample values

Grzegorz Nosek root at localdomain.pl
Tue May 31 13:25:17 CEST 2011


(collectd newbie alert)

I need a collectd setup that receives data over the network (or possibly 
a unix socket) very irregularly, aggregates it a'la rrd (as in GAUGE, 
COUNTER etc.) and exposes the aggregated data over the network again, so 
that on the other end of the network I can stuff the data into rrd files 
without risking e.g. NaNs (the updates may be less frequent than the RRD 
interval or may be way more often).

Please suggest a sensible setup in this scenario. As I'm only getting my 
feet wet with collectd, I'm not sure about the exact data flow.

My idea looks like:
1. source publishes data
2. network plugin receive_thread receives data and ends up in 
plugin_dispatch_values that calls *_write for all registered plugins
3. my new plugin reads the data in its *_write method and updates its 
4. aggregated data is provided in *_read, which gets called periodically 
by collectd core. The values provided have some metadata attached (like 
in the network plugin) so that they don't get fed back into *_write (or 
rather are ignored by it).

Does it make sense? Anything worth improving/doing differently?

Best regards,
  Grzegorz Nosek

More information about the collectd mailing list