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: [email protected]
Web: www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]