Acknowledgement and Event Handler

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
steph007
Posts: 143
Joined: Mon Jul 24, 2017 12:00 pm

Acknowledgement and Event Handler

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Acknowledgement and Event Handler

Post 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.
Former Nagios Employee
steph007
Posts: 143
Joined: Mon Jul 24, 2017 12:00 pm

Re: Acknowledgement and Event Handler

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Acknowledgement and Event Handler

Post 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.
steph007
Posts: 143
Joined: Mon Jul 24, 2017 12:00 pm

Re: Acknowledgement and Event Handler

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Acknowledgement and Event Handler

Post 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
Locked