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

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


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008
Ryan Kubica
 
Posts: n/a
Default Re: [rrd-users] merging 2 or more DEF data sources into one CDEF?

--===============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!&nbsp; Thank you.&nbsp; (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&nbsp; "LINE1:ds_u0#ff0000:blah"&nbsp; "GPRINT:vdsmax0:Max %10.3lf %S"<br><br><br><br><b><i>Simon Hobson &lt;linux@thehobsons.co.uk&gt;</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>&gt;What I am trying to do is take two or more datasources with <br>&gt;different time ranges and merge them
into one CDEF for display <br>&gt;(graph and legend.)<br>&gt;<br>&gt;Example:<br>&gt;<br>&gt; ds foo1 - start 7 days ago, end 6 days ago<br>&gt; ds foo2 - start 6 days ago, end 5 days ago<br>&gt; ds foo3 - start 5 days ago, end now<br>&gt;<br>&gt; cdef is foo1 or foo2 or foo3<br>&gt;<br>&gt;I have the correct time alignments for the adjacent time intervals, <br>&gt;ie: foo1 ends 60 seconds before foo2 starts on a 60 second interval <br>&gt;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&gt;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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:06 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0