Re: Import a RRD XML file
Benny Baumann <[email protected]>
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Am 27.07.2010 15:50, schrieb Thodie:
> Hi experts!
>
> I'm an ABAP developer and my job is to import (parse) a XML file which is
> generated by the RRDTool (and Nagios). See parts of the XML-file below.
> In my mind the XML-file looks a little bit strange. Especially that the date
> and time are added as comment and not as tag. Also the values are displayed
> exponential ("1.7500000000e+02 ") without any reason. I don't know the
> RRDTool and Nagios. What is here the problem? The RRDTool or Nagios? Is
> there an option to optimize the XML?
The comments in the file result only from conversion or calculation of
values derived from the internal storage format or values actually
printed. In short this means that given the date of the last
modification RRDTool can calculate itself which node belongs to which
timeslot in the file, thus this information is not required to read and
process the actual information.
Yes, that's not the best way to do XML, but as the XML dumps are mostly
used for backup purposes this is sufficient.
> Kind regards
> Thodie
Regards,
BenBE.
P.S.: You can stream in the XML information directly from librrd using a
callback function since version 1.4. This should make it easier to use
RRDTool without dumping everything to the filesystem first since those
XML dumps can get quite large.
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd">
> <!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
> <step> 60 </step> <!-- Seconds -->
> <lastupdate> 1279184004 </lastupdate> <!-- 2010-07-15 10:53:24 CEST -->
>
> <ds>
> <name> 1 </name>
> <type> GAUGE </type>
> <minimal_heartbeat> 8640 </minimal_heartbeat>
> <min> NaN </min>
> <max> NaN </max>
>
> <!-- PDP Status -->
> <last_ds> 175 </last_ds>
> <value> 4.2000000000e+03 </value>
> <unknown_sec> 0 </unknown_sec>
> </ds>
>
> <!-- Round Robin Archives --> <rra>
> <cf> AVERAGE </cf>
> <pdp_per_row> 1 </pdp_per_row> <!-- 60 seconds -->
>
> <params>
> <xff> 5.0000000000e-01 </xff>
> </params>
> <cdp_prep>
> <ds>
> <primary_value> 1.7500000000e+02 </primary_value>
> <secondary_value> 1.7500000000e+02 </secondary_value>
> <value> NaN </value>
> <unknown_datapoints> 0 </unknown_datapoints>
> </ds>
> </cdp_prep>
> <database>
> <!-- 2010-07-13 10:54:00 CEST / 1279011240 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 10:55:00 CEST / 1279011300 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 10:56:00 CEST / 1279011360 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 10:57:00 CEST / 1279011420 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 10:58:00 CEST / 1279011480 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 10:59:00 CEST / 1279011540 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 11:00:00 CEST / 1279011600 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 11:01:00 CEST / 1279011660 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 11:02:00 CEST / 1279011720 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 11:03:00 CEST / 1279011780 --> <row><v> 1.6196000000e+02
> </v></row>
> <!-- 2010-07-13 11:04:00 CEST / 1279011840 --> <row><v> 1.6597333333e+02
> </v></row>
> <!-- 2010-07-13 11:05:00 CEST / 1279011900 --> <row><v> 1.6597333333e+02
> </v></row>
> <!-- 2010-07-13 11:06:00 CEST / 1279011960 --> <row><v> 1.6597333333e+02
> </v></row>
> <!-- 2010-07-13 11:07:00 CEST / 1279012020 --> <row><v> 1.6597333333e+02
> </v></row>
> <!-- 2010-07-13 11:08:00 CEST / 1279012080 --> <row><v> 1.6597333333e+02
> </v></row>
_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) iQIcBAEBAgAGBQJNTx/JAAoJEPHTXLno4S6tPb0P/3SGt24jEFo595dXQA0K94c1 b6GWTEjKimro1sk3/llQqr+3DPjv/LoFGEWXGGFa2g8ruTcucGPqRzvLaSyXR3yl Rctfz+rH3NycZ22O4TskH61m3zmja4u+GOeq/85bx2U3b13IoHPxKghRYGpO5jH8 fp4D7V0XMCYSKNZMQqJAhrJcZZQ+pCvLDnbFIQcaCscW3fNYIE9pCjOMulOYIG5J ho4P1aoc9m8JdZk7kejfZf7x6iCcOCj5xVNSm9jFZ1he4ZBUSzgdiZ5xTAszF/C2 5+hS7uLAfo89FzUCHR0JSw3PzB4EhGyVHpYVZSSGH2yU4UzVroqr/lLMkek/Ne4O WhTVlkz2AMMdTeKvyXN9e9IDhDb7VzX963ZNxOQqV+jiGcZEfCw42Xh0m0h6ieM5 wCaV9dHwQgypVhXAC3Md46BzjPdJmVR18Mvmi+qGXjRX55eUTWzBHJMEpEfjLZUM VIZ96Q6ruxV4bCpjxciWGsDtaheoorTAFO1ugSss6QvXmoc5yiGV/PBJRtqrEAcb LA0XfjYhe9aL+Ui+0nWDIr+ARnCsmnrjTGNFZAeGKe03rf/aLZeZ0+BCTfwAB6ix Hzb4rGbye1gD4OKq0UOqDjI4fSyJqivNE3f0bgjAKn1Ef6mve9DHH9gUP7u0dOy3 xtSasqUWJbKQBRhsC1uW =bc2E -----END PGP SIGNATURE-----