abrist wrote:The easiest way would be to make use of the json api in core 4 (XI 2014 or newer). Browse to the following url and choose "archive cgi" and then "availability". Set the other required options and submit the query. This tool will allow you to check to see if the json api has in the info you are looking for.
http://<ip>/nagios/jsonquery.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist wrote:The easiest way would be to make use of the json api in core 4 (XI 2014 or newer). Browse to the following url and choose "archive cgi" and then "availability". Set the other required options and submit the query. This tool will allow you to check to see if the json api has in the info you are looking for.
http://<ip>/nagios/jsonquery.html
Tank you again. which format for start and end time fields ? I tryed in many formats but i always recieve the same message: The requested start time must be before the end time.
The json cgis use unix time stamps for the time values.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Well, just a little bit of parsing and division of the json cgi output will get you those numbers. But if you choose to not to do that, you are left with scraping the page from the availability cgi in core - which will be a bigger pita than just parsing and "mathing" the json.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist wrote:Well, just a little bit of parsing and division of the json cgi output will get you those numbers. But if you choose to not to do that, you are left with scraping the page from the availability cgi in core - which will be a bigger pita than just parsing and "mathing" the json.
OK. We believed that there would be an easier way since the information is in the database. Anyway, thank you for your help.
Now we have another problem. We upgraded the Nagios and would like to transfer it to a new server. But the old server is 32bits and the new 64. Is it possible?
It should be relatively painless. The only potential issue is related to the migration of performance data as rrds are binaries and must be rebuilt for the new arch. Make sure you have *at least* 3x as much free disk space as used disk space for the perfdata migration:
cmerchant wrote:It should be relatively painless. The only potential issue is related to the migration of performance data as rrds are binaries and must be rebuilt for the new arch. Make sure you have *at least* 3x as much free disk space as used disk space for the perfdata migration: