API for alerts and events
-
abhishekkayal89
- Posts: 6
- Joined: Mon Sep 16, 2019 6:54 am
API for alerts and events
is there any api for getting device deatils and logentries together
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API for alerts and events
Yes in XI under
Help -> Objects Reference
Help -> Objects Reference
-
abhishekkayal89
- Posts: 6
- Joined: Mon Sep 16, 2019 6:54 am
Re: API for alerts and events
objects/logentries gives events and alerts
but i am looking for respective device details along with it how to get in single api call
but i am looking for respective device details along with it how to get in single api call
-
abhishekkayal89
- Posts: 6
- Joined: Mon Sep 16, 2019 6:54 am
Re: API for alerts and events
or can we correlate the data from objects/logentries api with any other api available in Nagios XI api objects to get device details
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API for alerts and events
You cannot do it in a single call, you can get status from: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
GET objects/hoststatus
GET objects/servicestatus
-
abhishekkayal89
- Posts: 6
- Joined: Mon Sep 16, 2019 6:54 am
Re: API for alerts and events
but how i will relate the logentries api results with hostlist results to determine which alert is for which device
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API for alerts and events
The API isn't written to do this correlation, the best I can suggest would be to search the host names in the logs.