Page 2 of 4
Re: Availability Summary Data
Posted: Mon Jan 19, 2015 11:04 am
by tcpbr
Hi. We have made the upgrade. Can you send more information about how use json api to obtain Availability data?
Tank You
Re: Availability Summary Data
Posted: Mon Jan 19, 2015 11:41 am
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
Re: Availability Summary Data
Posted: Mon Jan 19, 2015 2:55 pm
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
Re: Availability Summary Data
Posted: Mon Jan 19, 2015 2:57 pm
by abrist
The json cgis use unix time stamps for the time values.
Re: Availability Summary Data
Posted: Mon Jan 19, 2015 3:11 pm
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
Re: Availability Summary Data
Posted: Mon Jan 19, 2015 3:48 pm
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.
Re: Availability Summary Data
Posted: Tue Jan 20, 2015 6:47 am
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?
Re: Availability Summary Data
Posted: Tue Jan 20, 2015 10:35 am
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.
Re: Availability Summary Data
Posted: Mon Feb 09, 2015 3:36 pm
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
Re: Availability Summary Data
Posted: Mon Feb 09, 2015 3:43 pm
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?