[rrd-users] Aggregate/combine several RRDs

Simon Hobson linux at thehobsons.co.uk
Thu Jun 19 22:20:04 CEST 2008

Jesper Skou Jensen wrote:

>I have used RRD for several years now, and am quite happy with it so
>far. But I've only been using various tools to generate graphs and
>stuff, but don't really know much about the structure of the RRDs.
>Right now I'm trying to aggregate a bunch of RRDs into one, that is, I
>have many RRD files that contains bandwidth/traffic "log" from some ADSL
>connections, and I would like to aggregate those files in a way that I
>can view the total bandwidth usage, both average and max. values.
>Is that possible? If so, could you please give me some pointers on how
>to get it done.

Yes, and, try reading the list archive for the past couple of days in 
that order - I'm sure it's been asked earlier this week !

Simply define multiple data sources using multiple DEF statements, 
each one can be from a different file. Then draw a stacked graph to 
show multiple values as a stack, or add them up with a CDEF statement 
if you only want one area.

eg :



Note that you can't get a MAX of the total traffic from a MAX of the 
individual counters.

Eg, if you consolidate 3 samples into one, and they are 1,0,0 for a, 
0,2,0 for b, and 0,0,1 for C :
MAX(a) is 1, MAX(b) is 2, MAX(c) is 1, sum of these would be 4, while 
the actual max is only 2.

More information about the rrd-users mailing list