rrd standard/classic performance graph DATA export to CSV

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

rrd standard/classic performance graph DATA export to CSV

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

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

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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