[rrd-users] merging 2 or more DEF data sources into one CDEF?

Simon Hobson linux at thehobsons.co.uk
Fri Apr 11 20:21:59 CEST 2008

Ryan Kubica wrote:
>What I am trying to do is take two or more datasources with 
>different time ranges and merge them into one CDEF for display 
>(graph and legend.)
>    ds foo1 - start 7 days ago, end 6 days ago
>    ds foo2 - start 6 days ago, end 5 days ago
>    ds foo3 - start 5 days ago, end now
>    cdef is foo1 or foo2 or foo3
>I have the correct time alignments for the adjacent time intervals, 
>ie: foo1 ends 60 seconds before foo2 starts on a 60 second interval 

OK, for two data sources I have this in a graph definition :



It's part of a shell script, so using normal Bash variable sustitutions.

For three sources just expand as required, I think this would do it 
(with the proviso that changedate2>changedate1) :


More information about the rrd-users mailing list