Availability Summary Data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tcpbr
Posts: 29
Joined: Fri Jul 11, 2014 12:22 pm

Re: Availability Summary Data

Post by tcpbr »


Hi. We have made the upgrade. Can you send more information about how use json api to obtain Availability data?

Tank You
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Availability Summary Data

Post by abrist »

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.
tcpbr
Posts: 29
Joined: Fri Jul 11, 2014 12:22 pm

Re: Availability Summary Data

Post by tcpbr »

abrist wrote:
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.

Query sample:
http://XXX.XXX.XXX.XXX/nagios/cgi-bin/a ... 2015-01-19
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Availability Summary Data

Post by abrist »

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.
tcpbr
Posts: 29
Joined: Fri Jul 11, 2014 12:22 pm

Re: Availability Summary Data

Post by tcpbr »

abrist wrote:The json cgis use unix time stamps for the time values.
The result not solve our problem !! We need a simple number. The percentual of Availability of a hostgroup for a specific time period..

Sample: 100%, 99%. Simply this!

Best Regards
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Availability Summary Data

Post by abrist »

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.
tcpbr
Posts: 29
Joined: Fri Jul 11, 2014 12:22 pm

Re: Availability Summary Data

Post by tcpbr »

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?
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Availability Summary Data

Post by cmerchant »

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:

http://support.nagios.com/wiki/index.ph ... Install.3F

Follow lmiltchev's post from earlier in this thread: (except in step 2 you are installing the current version of XI on the new 64-bit OS)

http://support.nagios.com/forum/posting ... 8#pr123177

Let us know if you have any further questions.
tcpbr
Posts: 29
Joined: Fri Jul 11, 2014 12:22 pm

Re: Availability Summary Data

Post by tcpbr »

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:

http://support.nagios.com/wiki/index.ph ... Install.3F

Follow lmiltchev's post from earlier in this thread: (except in step 2 you are installing the current version of XI on the new 64-bit OS)

http://support.nagios.com/forum/posting ... 8#pr123177

Let us know if you have any further questions.

HI. After migration of nagios to a new (64) server, we receive: Forbidden You don't have permission to access /nagiosxi/ on this server
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Availability Summary Data

Post by tmcdonald »

Was this new server a clean minimal install of CentOS/RHEL or had it been used previously?

Also, how exactly did you do the migration?
Former Nagios employee
Locked