1

I am using nagios API(rrdexport) to get data for device , but i need to plot the data in rrdgraph, since rrdgraph only takes .rrd file as input , how to i convert json file back to .rrd file , or is there a way to plot rrdgraph with json file as input.

R__raki__
  • 847
  • 4
  • 15
  • 30

1 Answers1

0

You have a couple of options.

  1. You could always generate your graph from the same RRD file that you used to originally export the XML. Since you can export the data you can also graph it.

  2. You could use rrdrestore to load the exported data back into a (temporary) RRD file, then call rrdgraph on that to make the graph.

  3. RRDTool supports libdbi as a data source, in the same way as RRD files. If you have an appropriate libdbi format driver for your data then you can pull it from there. For example, load your data into a mysql database, and let rrdtool graph from that.

For more information about using libdbi as a data source, see https://oss.oetiker.ch/rrdtool/doc/rrdgraph_libdbi.en.html

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39