Hi there,
We currently retrieve status information via JSON queries to our Nagios XI installation to give us status information on our monitoring screens, and it works great.
I would like to now extend this to displaying graphing data, and so my question is; is there any way to access the underlying performance data via a JSON type query ?
Thanks,
Matthew
Accessing Performance data
Re: Accessing Performance data
Try:
Is this what you were looking for?
Code: Select all
http://<ip address>/nagios/cgi-bin/statusjson.cgi?query=performancedataBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Accessing Performance data
Hi there,
I had already spotted that one. It gives me the current performance data for the Nagios server, I was more interested in getting the historic performance data for a service.
Thanks,
Matthew
I had already spotted that one. It gives me the current performance data for the Nagios server, I was more interested in getting the historic performance data for a service.
Thanks,
Matthew
Re: Accessing Performance data
The historic performance data actually isn't stored in the databse, but rather RRD files. I don't think there is a way to access this information through the API.
The information can be pulled from the /usr/local/nagios/share/perfdata/ directory on the XI server, though.
You could use a command similar to this to grab it, rrdtool fetch /usr/local/nagios/share/perfdata/myhost/myservice.rrd AVERAGE -s <starttime> -e <endtime>
The information can be pulled from the /usr/local/nagios/share/perfdata/ directory on the XI server, though.
You could use a command similar to this to grab it, rrdtool fetch /usr/local/nagios/share/perfdata/myhost/myservice.rrd AVERAGE -s <starttime> -e <endtime>
Former Nagios Employee