manpagez: man pages & more
man rrdxport(1)
Home | html | info | man
rrdxport(1)                         rrdtool                        rrdxport(1)


       rrdxport - Export data in XML format based on data from one or several


       rrdtool xport [-s|--start seconds] [-e|--end seconds]
       [-m|--maxrows rows] [--step value] [--json] [-t|--showtime] [--enumds]
       [--daemon|-d address] [DEF:vname=rrd:ds-name:CF] [CDEF:vname=rpn-
       expression] [XPORT:vname[:legend]]


       The xport function's main purpose is to write an XML formatted
       representation of the data stored in one or several RRDs. It can also
       extract numerical reports.

       If no XPORT statements are found, there will be no output.

       -s|--start seconds (default end-1day)
           The time when the exported range should begin. Time in seconds
           since epoch (1970-01-01) is required. Negative numbers are relative
           to the current time. By default one day worth of data will be
           printed.  See also AT-STYLE TIME SPECIFICATION section in the
           rrdfetch documentation for a detailed explanation on how to specify

       -e|--end seconds (default now)
           The time when the exported range should end. Time in seconds since
           epoch.  See also AT-STYLE TIME SPECIFICATION section in the
           rrdfetch documentation for a detailed explanation of ways to
           specify time.

       -m|--maxrows rows (default 400 rows)
           This works like the -w|--width parameter of rrdgraph.  In fact it
           is exactly the same, but the parameter was renamed to describe its
           purpose in this module. See rrdgraph documentation for details.

       --step value (default automatic)
           See rrdgraph documentation.

       --daemon|-d address
           Address of the rrdcached daemon. If specified, a "flush" command is
           sent to the server before reading the RRD files. This allows
           rrdtool to return fresh data even if the daemon is configured to
           cache values for a long time.  For a list of accepted formats, see
           the -l option in the rrdcached manual.

             rrdtool xport --daemon unix:/var/run/rrdcached.sock ...

           include the time into each data row.

           produce json formatted output (instead of xml)

           The generated xml should contain the data values in enumerated


           See rrdgraph documentation.

           See rrdgraph documentation.

           At least one XPORT statement should be present. The values
           referenced by vname are printed. Optionally add a legend.

Output format

       The output is enclosed in an xport element and contains two blocks. The
       first block is enclosed by a meta element and contains some meta data.
       The second block is enclosed by a data element and contains the data

       Let's assume that the xport command looks like this:

         rrdtool xport \
                 --start now-1h --end now \
                 DEF:xx=host-inout.lo.rrd:output:AVERAGE \
                 DEF:yy=host-inout.lo.rrd:input:AVERAGE \
                 CDEF:aa=xx,yy,+,8,* \
                 XPORT:xx:"out bytes" \
                 XPORT:aa:"in and out bits"

       The resulting meta data section is (the values will depend on the RRD

             <entry>out bytes</entry>
             <entry>in and out bits</entry>

       The resulting data section is:



         rrdtool xport \
                 DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
                 XPORT:out:"out bytes"


         rrdtool xport \
                 DEF:out1=if1-inouts.rrd:outoctets:AVERAGE \
                 DEF:out2=if2-inouts.rrd:outoctets:AVERAGE \
                 CDEF:sum=out1,out2,+ \
                 XPORT:out1:"if1 out bytes" \
                 XPORT:out2:"if2 out bytes" \
                 XPORT:sum:"output sum"


       The following environment variables may be used to change the behavior
       of "rrdtool xport":

           If this environment variable is set it will have the same effect as
           specifying the "--daemon" option on the command line. If both are
           present, the command line argument takes precedence.


       Tobias Oetiker <>

1.5.999                           2016-05-23                       rrdxport(1)

rrdtool 1.7.0 - Generated Sat Jan 6 08:10:52 CST 2018
© 2000-2021
Individual documents may contain additional copyright information.