<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Set up an additional CDEF.<br>
<pre>rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE <br> <b>CDEF:customvar=out,POP,12345</b>
XPORT:out:"out bytes" <br> XPORT:<b>customvar</b>:"Temp" >> /home/temp/abc.xml</pre>
Now you'll get a column with '12345' in it next to the outoctets column.<br>
<br>
Note that you need the 'out,POP' to make customvar a time series, although you throw away the original 'out' value. You can't just use 'CDEF:customvar=12345'.<br>
<br>
Steve<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><strong>Steve Shipway</strong></div>
<div style="font-family:Tahoma; font-size:13px">University of Auckland ITS</div>
<div style="font-family:Tahoma; font-size:13px"><em>UNIX Systems Design Lead</em></div>
<div style="font-family:Tahoma; font-size:13px"><a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a></div>
<div style="font-family:Tahoma; font-size:13px">Ph: +64 9 373 7599 ext 86487</div>
<div style="font-family:Tahoma; font-size:13px"><em></em> </div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF223870"><font color="#000000" size="2" face="Tahoma"><b>From:</b> rrd-users [rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] on behalf of Utpal Bora [cs14mtech11017@iith.ac.in]<br>
<b>Sent:</b> Friday, 27 March 2015 3:57 a.m.<br>
<b>To:</b> rrd-users@lists.oetiker.ch<br>
<b>Subject:</b> [rrd-users] Help in RRD XPORT<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hello Everyone,<br>
<br>
</div>
I am working on a Network Visualization project using RRDTool for my graduate course on Network Engineering.
<br>
<br>
</div>
I want to use the export feature of RRDtool to create an XML where I want to add some hard coded values(DS not in RRD) to the xml.<br>
</div>
However, I could not find a solution as of yet.<br>
</div>
Please assist me on this.<br>
<br>
</div>
What I am trying to do - <br>
<pre>rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml<br> XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml<br><br>Here I want to append SOME_CUSTOM_VALUE to the output xml, which I am not able to do as SOME_CUSTOM_VALUE is not present in the database.</pre>
<pre><br></pre>
<br>
<div>
<div><br>
<div>
<div>
<div>
<div><br clear="all">
<div><br>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div>Regards,<br>
<br>
</div>
Utpal Bora<br>
</div>
<div>M. Tech 1st year<br>
</div>
Computer Science & Engineering<br>
</div>
<div>IIT Hyderabad<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>