Page 1 of 1

Acknowledgement and Event Handler

Posted: Sat Aug 25, 2018 9:44 am
by steph007
Hi,

I use a Event Handler for integration with our ticket system.
It work well for all situation but one.
When a service is acknowledge, the Event Handler don't detect it is and contact out ticket system to raise a ticket. But since it's acknowledge, I don't want raise a ticket. Is there a way to see if there is a ack flag on the service with Event Handler? I did not find any macro for doing such thing.

Re: Acknowledgement and Event Handler

Posted: Sun Aug 26, 2018 1:33 pm
by rkennedy
There may be an API option available for this now, if not, it may make a great feature request.

One way I know of to accomplish this, is to parse status.dat and look for a comment correlating to the host_name / service_description.

Re: Acknowledgement and Event Handler

Posted: Mon Aug 27, 2018 10:33 am
by steph007
Thank you rkennedy,

I thought about this and it will work.
That mean that I have to add some logic to my actual script to get the information from status.dat.
Would be great if problem_has_been_acknowledged can be passed to my script like any other macro with the event handler.

Re: Acknowledgement and Event Handler

Posted: Mon Aug 27, 2018 11:01 am
by ssax
rkennedy is correct, you'd need to either query the API object for problem_acknowledged or pull from the status.dat in your script.

Re: Acknowledgement and Event Handler

Posted: Tue Aug 28, 2018 2:14 pm
by steph007
Thank you. I now used status.dat to confirme the acknowledgement.
Could be a good idea to ask for this for a new version of Nagios. Would be nice to have a macro for acknowledgement.

Re: Acknowledgement and Event Handler

Posted: Tue Aug 28, 2018 4:07 pm
by ssax
This would be a Nagios Core feature request, you can create a feature request here if you'd like:

https://github.com/NagiosEnterprises/nagioscore/issues

Thank you