I am trying to write an event handler that runs on one of two services on a host. If the second of the services already has an acknowledgement, the handler will acknowledge the first service with the same comment.
However, even if the handler acknowledges the service immediately, I still get the problem notification. I'd like to prevent this. Is there a way?
How can an event handler prevent notifications?
Re: How can an event handler prevent notifications?
Please post your object definitions for us to review. If you have your notification_interval set to 0, then there isn't any time for it to react and suppress notifications.
Former Nagios Employee
Re: How can an event handler prevent notifications?
notification_interval is 120... but I'm unsure if that is relevant here. That is the re-notification interval; it still generates a notification immediately upon a HARD problem state. Setting this to zero would suppress re-notifications altogether. Neither affects the initial notification trigger.
The handler sends an ack command immediately, and what we get is a problem notification and an acknowledgement notification. I'd like it if there was a way to suppress the problem notification, but my suspicion is that the problem->handler->notification process can't be stopped by the time it gets to the handler. Commands to--say--disable notifications don't take effect soon enough.
The handler sends an ack command immediately, and what we get is a problem notification and an acknowledgement notification. I'd like it if there was a way to suppress the problem notification, but my suspicion is that the problem->handler->notification process can't be stopped by the time it gets to the handler. Commands to--say--disable notifications don't take effect soon enough.
Re: How can an event handler prevent notifications?
Odd it's acting that way. We'll definetly need to see your object definitions, as well as your nagios.log from a specific day where this occured. (/usr/local/nagios/var/archives/nagios-########.log is where they're located)
This will allow us to compare everything at play. If it's triggering right away, when it's not supposed to, it could be an event handler executing.
This will allow us to compare everything at play. If it's triggering right away, when it's not supposed to, it could be an event handler executing.
Former Nagios Employee