Page 1 of 1

rrd standard/classic performance graph DATA export to CSV

Posted: Wed Jan 06, 2021 1:06 pm
by zaji_nms
Dear Expert

we are using standard rrdtool performance graph and we are satisfied (not using high chart) as we are very comfortable with classic view.

however is there any way to export rrdtool standard/classic performance graph to export graph values in CSV format?

regards

Re: rrd standard/classic performance graph DATA export to CS

Posted: Wed Jan 06, 2021 5:34 pm
by ssax
Not from the graphs but you should be able to query the RRDs directly which pretty much matches what the CSV outputs through this API endpoint, see here on your XI server:

Code: Select all

http://YOURXISERVER/nagiosxi/help/api-object-reference.php#objects-rrdexport
You can use curl to get the data and jq to parse it the way you want:
- Change YOURXISERVER, YOURAPIKEY, YOURHOSTNAME, and YOURSERVICEDESCRIPTION
- If you want to do it for the host, no need to pass service_description=YOURSERVICEDESCRIPTION or change YOURSERVICEDESCRIPTION to _HOST_.

Code: Select all

yum install jq -y
curl --silent -k -L 'http://YOURXISERVER/nagiosxi/api/v1/objects/rrdexport?apikey=YOURAPIKEY&pretty=1&host_name=YOURHOSTNAME&service_description=YOURSERVICEDESCRIPTION' | jq '.data.row[] | [.t, .v[]] | @csv' > /tmp/YOUR.csv
That will create the CSV /tmp/YOUR.csv.

Re: rrd standard/classic performance graph DATA export to CS

Posted: Thu Jan 07, 2021 2:54 am
by zaji_nms
Dear ssax

Thanks for reply, but it should be via some easy steps via WEB/HTTP, should be away from two/three mouse click, as should be on our fingertip.

It should be selectable based on HOST/Service, so in BULK mode we can export, not one by one.

if possible, plz put Feature Add request.

Regards

Re: rrd standard/classic performance graph DATA export to CS

Posted: Thu Jan 07, 2021 5:38 pm
by ssax
I was giving you the only way that you can get access to the data with the existing functionality.

I have created the request for development to add the feature (I included a link back to this thread so the developers will see it):

XI - PNP4Nagios Graphs Enabled - Add the ability to export data to CSV like highcharts has - Add the ability to do this in bulk as well