[rrd-users] Aggregation functions for combining whole data sets or averaging over many RRDs

Alex van den Bogaerdt alex at ergens.op.het.net
Sun Mar 23 14:21:59 CET 2008

On Sun, Mar 23, 2008 at 12:44:21PM +0100, Carsten Aulbert wrote:

[snip: one DS out of each of 24 databases]
> CDEF:preavg=watin001,watin002,watin003,watin004,watin005,watin006,watin007,watin008,watin009,watin010,watin011,watin012,watin013,watin014,watin015,watin016,watin017,watin018,watin019,watin020,watin021,watin022,watin023,watin024,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+ 
> \
>      CDEF:avg=preavg,24,/ \
>      "LINE1:avg#FF0000"
> Is there a better way to do it?

You can combine those two CDEFs:


Be aware of the following: should one (or more) of these DSes become
unknown, the sum will be unknown.

For this reason, AVG exists:  CDEF:x=a,b,c,d,4,AVG

One possible problem though: if only one out of 24 is known, that will
become the 'average'.

Alex van den Bogaerdt

More information about the rrd-users mailing list