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

Ryan Kubica kubicaryan at yahoo.com
Wed Apr 9 05:15:26 CEST 2008


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.)

Example:

   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 step.

I actually looked for an 'OR'  operator - one which would just OR all the datapoints in the CDEF and use which ever was valid first ... and tried using the def1,UN,def2,def1,IF method.

No data shows in the graph or legend.

Url of output:

http://www.uploadyourimages.com/img/520921test.png

Here is the rrdtool command line for 2 datasources:

/apps/epic/rrdtool-1.2.99907080300/bin/rrdtool graph
/apps/epic/apache-2.0.61/htdocs/test/test.png
-aPNG -se-2d -e1207628520
DEF:defwww100=/data01/epic/rrd/net/snmp/www100/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE:start=1207369320:end=1207542060 
CDEF:def_uwww100=defwww100
DEF:defwww101=/data01/epic/rrd/net/snmp/www101/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE:start=1207542120:end=1207628520 
CDEF:def_uwww101=defwww101
CDEF:ds_u0=def_uwww100,def_uwww101,+ 
VDEF:vdsmax0=ds_u0,MAXIMUM
LINE1:ds_u0#ff0000:blah
"GPRINT:vdsmax0:Max %10.3lf %S"

In part I am wanting to use something like this for two purposes:

1) correct multi DS addition when one DS has 'nan' during the time interval.  RRD can use the 'CDEF:def_u$def=def,UN,0,def,IF' method for graph lines, but for -some- reason the Last and Min VDEF's both show '0' if this is used ... or 'nan' if it's not used ... both not acceptable.

2) tracking an app stat between two hosts - ie: a maintenance which transitions the app from host1 to host2.

3) I can create a merged RRD as a 'hack' - which is what I am doing for very important datasources, but that's expensive for too many datasources.


Thanks,

-Ryan


       
---------------------------------
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20080408/48dce9a0/attachment.html 


More information about the rrd-users mailing list