Accessing Performance data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
matthewk2
Posts: 11
Joined: Tue Jun 23, 2015 6:30 am

Accessing Performance data

Post by matthewk2 »

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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Accessing Performance data

Post by lmiltchev »

Try:

Code: Select all

http://<ip address>/nagios/cgi-bin/statusjson.cgi?query=performancedata
Is this what you were looking for?
Be sure to check out our Knowledgebase for helpful articles and solutions!
matthewk2
Posts: 11
Joined: Tue Jun 23, 2015 6:30 am

Re: Accessing Performance data

Post by matthewk2 »

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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Accessing Performance data

Post by rkennedy »

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>
Former Nagios Employee
Locked