Page 1 of 1
API for alerts and events
Posted: Mon Sep 16, 2019 11:42 pm
by abhishekkayal89
is there any api for getting device deatils and logentries together
Re: API for alerts and events
Posted: Tue Sep 17, 2019 6:34 am
by scottwilkerson
Yes in XI under
Help -> Objects Reference
Re: API for alerts and events
Posted: Wed Sep 18, 2019 12:31 am
by abhishekkayal89
objects/logentries gives events and alerts
but i am looking for respective device details along with it how to get in single api call
Re: API for alerts and events
Posted: Wed Sep 18, 2019 12:51 am
by abhishekkayal89
or can we correlate the data from objects/logentries api with any other api available in Nagios XI api objects to get device details
Re: API for alerts and events
Posted: Wed Sep 18, 2019 6:16 am
by scottwilkerson
abhishekkayal89 wrote:objects/logentries gives events and alerts
but i am looking for respective device details along with it how to get in single api call
You cannot do it in a single call, you can get status from:
GET objects/hoststatus
GET objects/servicestatus
Re: API for alerts and events
Posted: Thu Sep 19, 2019 2:07 am
by abhishekkayal89
but how i will relate the logentries api results with hostlist results to determine which alert is for which device
Re: API for alerts and events
Posted: Thu Sep 19, 2019 6:36 am
by scottwilkerson
The API isn't written to do this correlation, the best I can suggest would be to search the host names in the logs.