blocking character of event_handlers

Ethan Galstad nagios at nagios.org
Sun Apr 13 19:52:30 CEST 2008


Michael Streb wrote:
> Hi list,
> 
> today i expirienced a problem with long running event_handlers in nagios
> 3.x, while the event_handler is executed nagios didn`t run any service or
> hostchecks.
> 
> So i digged a bit deeper and came to the conclusion that nagios is really
> blocked while an event_handler is executed.
> 
> In my case i just defined an service event_handler with "sleep 100" as
> command, so nagios stopped checking for 100 seconds and the scheduling queue
> freeze in.
> -> no checks have been executed for 100 seconds.
> 
> In my opinion this is a horrible scenario in huge environments with short
> running event_handlers too, e.g. restarting apache on many servers could
> cause nagios to stop it`s work because hundreds of event_handlers are
> executed sequential.
> 
> Is there a reason why this is done like this ?
> 
> Regards,
> 
> Michael

Partly due to historical design reasons, partly because blocking
behavior might be necessary.  Two options are available:

1. Event handlers can spawn a background process to do the actual work,
at which point control is immediately passed back to Nagios.

2. An event broker module could be created to override the default
behavior. This would require more work, but be more efficient than #1.


Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone




More information about the Developers mailing list