How to convert json file from nagios to rrd for plotting with rrdgraph?

356 Views Asked by At

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.

1

There are 1 best solutions below

0
Steve Shipway On

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