Page 1 of 1

Intermittent issue with NagiosXI API calls

Posted: Thu Oct 31, 2019 1:29 am
by gsl_ops_practice
* As per company requirement, we need to send NagiosXI events into another centralised tool

* We use custom API adaptor to pull the events from NagiosXI via API call.
Links used custom API adaptor to pull the services and hoststatus calls as below.

https://<nagiosxi-ip>/nagiosxi/api/v1/objects/hoststatus?apikey=<APIKEYforuseraccount>&pretty=1
https://<nagiosxi-ip>/nagiosxi/api/v1/objects/servicestatus?apikey=<APIKEYforuseraccount>&pretty=1

* We extract the all the services and host status from NagiosXI server

* Noticed intermittently, that some of the fields are NOT having values while retrieving the data
Fields that have this issue are
display_name
state_type


* Can you please advise if there is known issue within NagiosXI while retrieving data in prettyJSON format or JSON format ?

* How can we check from NagiosXI logs that a query is made and what information was passed on to API call ?

* Any logs or details needed from NagiosXI to investigate further ?

Re: Intermittent issue with NagiosXI API calls

Posted: Thu Oct 31, 2019 9:15 am
by lmiltchev
* Noticed intermittently, that some of the fields are NOT having values while retrieving the data
Fields that have this issue are
display_name
state_type
What is the version of Nagios XI that you are currently using? I am not able to recreate the issue in 5.6.7. Can you check what is the display_name value for your host/service in the objects.cache file, and the value of state_type in the status.dat? Do these values match to whatever you see in the REST API or there is a mismatch?
* How can we check from NagiosXI logs that a query is made and what information was passed on to API call ?
Currently, we are not logging the REST API calls but we will be in Nagios XI 5.7.

Re: Intermittent issue with NagiosXI API calls

Posted: Wed Nov 06, 2019 2:32 pm
by benjaminsmith
Hello @gsl_ops_practice,

Just checking in with you. Are you still having issues with API or have further questions? When you have a moment, please let us know. Thanks.