Page 1 of 1

Nagios can do auto acknowledgment

Posted: Tue Feb 16, 2021 3:22 am
by bashar.abed
Hi Nagios team ,

I have nagios XI system version 5.6.5 we need you help about this issue

Nagios can do auto acknowledgment after 7 days if hosts or services are critical or warning

Thanks

Re: Nagios can do auto acknowledgment

Posted: Tue Feb 16, 2021 2:45 pm
by cdienger
This functionality doesn't currently exist, but it could be scripted using the API and external commands.

For example, to get a list of hosts that are in a DOWN or UNKNOWN state and have not been acknowledged:

Code: Select all

curl -XGET "https://xi_ip/nagiosxi/api/v1/objects/hoststatus?apikey=apikey&pretty=1&problem_has_been_acknowledged=0&current_state=1" -k
curl -XGET "https://xi_ip/nagiosxi/api/v1/objects/hoststatus?apikey=apikey&pretty=1&problem_has_been_acknowledged=0&current_state=2" -k
Examples specific to your XI instance can be found under Help > API Docs > Objects Reference.

That will give you information like how long it has been in that state. After parsing the data out of the response you can submit an acknowledgement - https://assets.nagios.com/downloads/nag ... mand_id=39. An external command for services also exists - https://assets.nagios.com/downloads/nag ... mand_id=40.

Re: Nagios can do auto acknowledgment

Posted: Wed Feb 17, 2021 5:19 am
by bashar.abed
Many thanks for your response

please send me more details about API and External Command

Re: Nagios can do auto acknowledgment

Posted: Wed Feb 17, 2021 2:30 pm
by cdienger
Have you had the chance to look at the documents I linked to? Is there something specific that needs clarification?

Re: Nagios can do auto acknowledgment

Posted: Mon Feb 22, 2021 8:34 am
by hh_naseef
Hi,
is there any way to use POST or PUT methods in addition to GET?
what is the Nagios's roadmap to enhance API capabilities to include rest of functions ?

Re: Nagios can do auto acknowledgment

Posted: Mon Feb 22, 2021 6:48 pm
by cdienger
Yes, POST and PUT can be used to create or modify configurations. You can find examples under Help > API Docs > Config Reference, and System Reference.

We don't list any specific features for the API on our roadmaps page(https://www.nagios.com/roadmaps/), but if you have something you'd like to see implemented, let us know and we can submit a feature request if needed.