This is a discussion on Re: [rrd-users] merging 2 or more DEF data sources into one CDEF? within the RRD Users forums, part of the Networking and Network Related category; --===============1915180916== Content-Type: multipart/alternative; boundary="0-1684435575-1207946047=:3798" Content-Transfer-Encoding: 8bit --0-1684435575-1207946047=:3798 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1915180916==
Content-Type: multipart/alternative; boundary="0-1684435575-1207946047=:3798" Content-Transfer-Encoding: 8bit --0-1684435575-1207946047=:3798 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit beautiful! Thank you. (example i pasted back is 3 ds's - working.) /apps/epic/rrdtool-1.2.99907080300/bin/rrdtool graph /apps/epic/apache-2.0.61/htdocs/test/test.png -aPNG -se-3d -e1207628520 -l0 DEF:defwww100=/data01/epic/rrd/net/snmp/www100/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE DEF:defwww101=/data01/epic/rrd/net/snmp/www101/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE DEF:defwww102=/data01/epic/rrd/net/snmp/www102/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE CDEF:ds_u0=TIME,1207369320,LT,defwww100,TIME,12074 55720,LT,defwww101,defwww102,IF,IF VDEF:vdsmax0=ds_u0,MAXIMUM "LINE1:ds_u0#ff0000:blah" "GPRINT:vdsmax0:Max %10.3lf %S" Simon Hobson <linux@thehobsons.co.uk> wrote: 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.) > >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. OK, for two data sources I have this in a graph definition : DEF:data1=${RRDPath1}/${RRDName1}:${Selection}:AVERAGE DEF:data2=${RRDPath2}/${RRDName2}:${Selection}:AVERAGE CDEF:data=TIME,${ChangeDate},LT,data1,data2,IF 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) : CDEF:data=TIME,${ChangeDate1},LT,data1,TIME,${Chan geDate2},LT,data2,data3,IF,IF __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1684435575-1207946047=:3798 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <br>beautiful! Thank you. (example i pasted back is 3 ds's - working.)<br><br>/apps/epic/rrdtool-1.2.99907080300/bin/rrdtool graph /apps/epic/apache-2.0.61/htdocs/test/test.png -aPNG -se-3d -e1207628520 -l0 DEF:defwww100=/data01/epic/rrd/net/snmp/www100/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE DEF:defwww101=/data01/epic/rrd/net/snmp/www101/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE DEF:defwww102=/data01/epic/rrd/net/snmp/www102/.1.3.6.1.2.1.25.1.6.0.rrd:epoch:AVERAGE CDEF:ds_u0=TIME,1207369320,LT,defwww100,TIME,12074 55720,LT,defwww101,defwww102,IF,IF VDEF:vdsmax0=ds_u0,MAXIMUM "LINE1:ds_u0#ff0000:blah" "GPRINT:vdsmax0:Max %10.3lf %S"<br><br><br><br><b><i>Simon Hobson <linux@thehobsons.co.uk></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Ryan Kubica wrote:<br>>What I am trying to do is take two or more datasources with <br>>different time ranges and merge them into one CDEF for display <br>>(graph and legend.)<br>><br>>Example:<br>><br>> ds foo1 - start 7 days ago, end 6 days ago<br>> ds foo2 - start 6 days ago, end 5 days ago<br>> ds foo3 - start 5 days ago, end now<br>><br>> cdef is foo1 or foo2 or foo3<br>><br>>I have the correct time alignments for the adjacent time intervals, <br>>ie: foo1 ends 60 seconds before foo2 starts on a 60 second interval <br>>step.<br><br>OK, for two data sources I have this in a graph definition :<br><br> DEF:data1=${RRDPath1}/${RRDName1}:${Selection}:AVERAGE<br> DEF:data2=${RRDPath2}/${RRDName2}:${Selection}:AVERAGE<br><br> CDEF:data=TIME,${ChangeDate},LT,data1,data2,IF<br> <br>It's part of a shell script, so using normal Bash variable sustitutions.<br><br>For three sources just expand as required, I think this would do it <br>(with the proviso that changedate2>changedate1) :<br><br> <br>CDEF:data=TIME,${ChangeDate1},LT,data1,TIME,${ ChangeDate2},LT,data2,data3,IF,IF<br><br></blockquote><br><p> _______________________________ ___________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com --0-1684435575-1207946047=:3798-- --===============1915180916== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users --===============1915180916==-- |