Historical data with numeric measurement from REST API
Posted: Thu Aug 24, 2017 3:36 pm
I've been trying to get Nagios historical (Archive JSON CGI) data using its REST API (jsonquery.html). I figured out that I can only get a flag "OK" or "NOK" for CPU Load for example, when querying it for past data, unlike when getting status data (Status JSON CGI) where I don't get "OK" or "NOK", but I get the actual numeric values, for example, CPU load numerically (ex: CPU_Load=x.xxx; y.yyy; z.zzz).
In one of the attachments here (Example of data for chart of historical data) we have a chart that shows data from the past about CPU Load. Since I can generate this chart with numeric values, I believe Nagios keeps these values but the REST API for historical data does not expose numbers themselves to the end user. The second attachament (Example of statusJSON.cgi with numeric values) shows numeric values which is just what I need, but this represents current data/status. My question is how can I have access to numeric values from the past?? Is it possible to quer statusJSON.cgi setting start and end time so I can get, let's say, a collection of CPU load values from timestamp1 to timestamp2? For example: https://myserver/nagios/cgi-bin/statusj ... 1496274384
Thanks!
In one of the attachments here (Example of data for chart of historical data) we have a chart that shows data from the past about CPU Load. Since I can generate this chart with numeric values, I believe Nagios keeps these values but the REST API for historical data does not expose numbers themselves to the end user. The second attachament (Example of statusJSON.cgi with numeric values) shows numeric values which is just what I need, but this represents current data/status. My question is how can I have access to numeric values from the past?? Is it possible to quer statusJSON.cgi setting start and end time so I can get, let's say, a collection of CPU load values from timestamp1 to timestamp2? For example: https://myserver/nagios/cgi-bin/statusj ... 1496274384
Thanks!