Discussion:
[rrd-users] Help in RRD XPORT
(too old to reply)
Utpal Bora
2015-03-26 14:57:43 UTC
Permalink
Hello Everyone,

I am working on a Network Visualization project using RRDTool for my
graduate course on Network Engineering.

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.
However, I could not find a solution as of yet.
Please assist me on this.

What I am trying to do -

rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml
XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml

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

Utpal Bora
M. Tech 1st year
Computer Science & Engineering
IIT Hyderabad
Steve Shipway
2015-03-26 22:18:44 UTC
Permalink
Set up an additional CDEF.

rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
CDEF:customvar=out,POP,12345
XPORT:out:"out bytes"
XPORT:customvar:"Temp" >> /home/temp/abc.xml

Now you'll get a column with '12345' in it next to the outoctets column.

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

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz<mailto:***@auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487

________________________________
From: rrd-users [rrd-users-bounces+s.shipway=***@lists.oetiker.ch] on behalf of Utpal Bora [***@iith.ac.in]
Sent: Friday, 27 March 2015 3:57 a.m.
To: rrd-***@lists.oetiker.ch
Subject: [rrd-users] Help in RRD XPORT

Hello Everyone,

I am working on a Network Visualization project using RRDTool for my graduate course on Network Engineering.

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.
However, I could not find a solution as of yet.
Please assist me on this.

What I am trying to do -

rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml
XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml

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.





--
Regards,

Utpal Bora
M. Tech 1st year
Computer Science & Engineering
IIT Hyderabad
Utpal Bora
2015-03-27 13:50:48 UTC
Permalink
Thank you very much Steve.

rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
* CDEF:customvar=out,POP,123*
XPORT:out:"out bytes"
XPORT:*customvar*:"Temp" >> /home/temp/abc.xml


I tried as you suggested. However, I am getting the error "ERROR: invalid
rpn expression in: d1,POP,123" .
Then I tried using TIME function, which worked fine. Is it that we can use
POP function only for time variables?

My requirement is to return the PATH of the database as a STRING in the
xml. Is it possible to do so? Or the stack can handle only Time variables
or numbers?

rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
* CDEF:customvar=out,POP,"/path/to/if1-inouts.rrd"*
XPORT:out:"out bytes"
XPORT:*customvar*:"Temp" >> /home/temp/abc.xml

Thanks again.
Post by Steve Shipway
Set up an additional CDEF.
rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
*CDEF:customvar=out,POP,12345*
XPORT:out:"out bytes"
XPORT:*customvar*:"Temp" >> /home/temp/abc.xml
Now you'll get a column with '12345' in it next to the outoctets column.
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'.
Steve
*Steve Shipway*
University of Auckland ITS
*UNIX Systems Design Lead*
Ph: +64 9 373 7599 ext 86487
------------------------------
*From:* rrd-users [rrd-users-bounces+s.shipway=
*Sent:* Friday, 27 March 2015 3:57 a.m.
*Subject:* [rrd-users] Help in RRD XPORT
Hello Everyone,
I am working on a Network Visualization project using RRDTool for my
graduate course on Network Engineering.
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.
However, I could not find a solution as of yet.
Please assist me on this.
What I am trying to do -
rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml
XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml
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.
--
Regards,
Utpal Bora
M. Tech 1st year
Computer Science & Engineering
IIT Hyderabad
--
Regards,

Utpal Bora
M. Tech 1st year
Computer Science & Engineering
Steve Shipway
2015-03-28 06:46:14 UTC
Permalink
"ERROR: invalid rpn expression in: d1,POP,123" -- This will assume you have already defined a variable 'd1' using either a DEF or CDEF. If you haven't then you'll get this error.

As for setting a CDEF to a string value, this is impossible. RRDTool only handles numerical time-series data, so you cannot get a string output like this using the XPORT function.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz<mailto:***@auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487

________________________________
From: Utpal Bora [***@iith.ac.in]
Sent: Saturday, 28 March 2015 2:50 a.m.
To: Steve Shipway
Cc: rrd-***@lists.oetiker.ch
Subject: Re: [rrd-users] Help in RRD XPORT

Thank you very much Steve.

rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
CDEF:customvar=out,POP,123
XPORT:out:"out bytes"
XPORT:customvar:"Temp" >> /home/temp/abc.xml

I tried as you suggested. However, I am getting the error "ERROR: invalid rpn expression in: d1,POP,123" .
Then I tried using TIME function, which worked fine. Is it that we can use POP function only for time variables?

My requirement is to return the PATH of the database as a STRING in the xml. Is it possible to do so? Or the stack can handle only Time variables or numbers?

rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
CDEF:customvar=out,POP,"/path/to/if1-inouts.rrd"
XPORT:out:"out bytes"
XPORT:customvar:"Temp" >> /home/temp/abc.xml


Thanks again.

On Fri, Mar 27, 2015 at 3:48 AM, Steve Shipway <***@auckland.ac.nz<mailto:***@auckland.ac.nz>> wrote:
Set up an additional CDEF.

rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
CDEF:customvar=out,POP,12345
XPORT:out:"out bytes"
XPORT:customvar:"Temp" >> /home/temp/abc.xml

Now you'll get a column with '12345' in it next to the outoctets column.

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

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz<mailto:***@auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487

________________________________
From: rrd-users [rrd-users-bounces+s.shipway=***@lists.oetiker.ch<mailto:***@lists.oetiker.ch>] on behalf of Utpal Bora [***@iith.ac.in<mailto:***@iith.ac.in>]
Sent: Friday, 27 March 2015 3:57 a.m.
To: rrd-***@lists.oetiker.ch<mailto:rrd-***@lists.oetiker.ch>
Subject: [rrd-users] Help in RRD XPORT

Hello Everyone,

I am working on a Network Visualization project using RRDTool for my graduate course on Network Engineering.

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.
However, I could not find a solution as of yet.
Please assist me on this.

What I am trying to do -

rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml
XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml

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.





--
Regards,

Utpal Bora
M. Tech 1st year
Computer Science & Engineering
IIT Hyderabad



--
Regards,

Utpal Bora
M. Tech 1st year
Computer Science & Engineering
Utpal Bora
2015-03-30 21:12:14 UTC
Permalink
Thanks a lot Steve. That cleared all my doubts.
Post by Steve Shipway
"ERROR: invalid rpn expression in: d1,POP,123" -- This will assume you
have already defined a variable 'd1' using either a DEF or CDEF. If you
haven't then you'll get this error.
As for setting a CDEF to a string value, this is impossible. RRDTool only
handles numerical time-series data, so you cannot get a string output like
this using the XPORT function.
Steve
*Steve Shipway*
University of Auckland ITS
*UNIX Systems Design Lead*
Ph: +64 9 373 7599 ext 86487
------------------------------
*Sent:* Saturday, 28 March 2015 2:50 a.m.
*To:* Steve Shipway
*Subject:* Re: [rrd-users] Help in RRD XPORT
Thank you very much Steve.
rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
* CDEF:customvar=out,POP,123*
XPORT:out:"out bytes"
XPORT:*customvar*:"Temp" >> /home/temp/abc.xml
I tried as you suggested. However, I am getting the error "ERROR: invalid
rpn expression in: d1,POP,123" .
Then I tried using TIME function, which worked fine. Is it that we can
use POP function only for time variables?
My requirement is to return the PATH of the database as a STRING in the
xml. Is it possible to do so? Or the stack can handle only Time variables
or numbers?
rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
* CDEF:customvar=out,POP,"/path/to/if1-inouts.rrd"*
XPORT:out:"out bytes"
XPORT:*customvar*:"Temp" >> /home/temp/abc.xml
Thanks again.
Post by Steve Shipway
Set up an additional CDEF.
rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE
*CDEF:customvar=out,POP,12345*
XPORT:out:"out bytes"
XPORT:*customvar*:"Temp" >> /home/temp/abc.xml
Now you'll get a column with '12345' in it next to the outoctets column.
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'.
Steve
*Steve Shipway*
University of Auckland ITS
*UNIX Systems Design Lead*
Ph: +64 9 373 7599 ext 86487
------------------------------
*From:* rrd-users [rrd-users-bounces+s.shipway=
*Sent:* Friday, 27 March 2015 3:57 a.m.
*Subject:* [rrd-users] Help in RRD XPORT
Hello Everyone,
I am working on a Network Visualization project using RRDTool for my
graduate course on Network Engineering.
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.
However, I could not find a solution as of yet.
Please assist me on this.
What I am trying to do -
rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml
XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml
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.
--
Regards,
Utpal Bora
M. Tech 1st year
Computer Science & Engineering
IIT Hyderabad
--
Regards,
Utpal Bora
M. Tech 1st year
Computer Science & Engineering
--
Regards,

Utpal Bora
M. Tech 1st year
Computer Science & Engineering
Loading...