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
rrd standard/classic performance graph DATA export to CSV
-
- Posts: 616
- Joined: Tue Oct 16, 2012 12:28 am
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: rrd standard/classic performance graph DATA export to CS
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:
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_.
That will create the CSV /tmp/YOUR.csv.
Code: Select all
http://YOURXISERVER/nagiosxi/help/api-object-reference.php#objects-rrdexport
- 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
-
- Posts: 616
- Joined: Tue Oct 16, 2012 12:28 am
Re: rrd standard/classic performance graph DATA export to CS
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
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
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: rrd standard/classic performance graph DATA export to CS
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
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