Re: [Nagios-devel] Event handlers functionality reapplied to Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Event handlers functionality reapplied to Nagios

Post by Guest »

On 02/25/2013 04:31 PM, Ton Voon wrote:
> Andreas,
>
> We've noticed that the event handlers do not currently work in Nagios
> 4 trunk. It seems that there is a FIXME message where the worker part
> was not implemented.
>

I just tested this, and event handlers work properly here. Granted, my
test only involves running a command that writes a few lines to a file,
so it finishes quickly and never fails.

In what way do you consider them broken?

> We've now implemented this, so I think this is now working as
> expected.
>
> Please find the patch below, nagios_4_support_event_handlers.patch.
> This applies on top of the envvar support we added for Nagios 4
> (subject "Fix default value for enable_environment_macros") which is
> reattached as nagios_macro_environents_in_command_definition.patch.
>
> Are there any other things that are not implemented yet that you
> would like some assistance with?
>

Downtime and comment handling needs a complete rewrite to avoid O(xn)
removal time. A doubly linked list would do the trick. We can add a
fan-out table later. Note that you'll have to do clever tricks with
a container_of() macro to get a doubly linked list without breaking
the ABI though. Using the fact that the first entry of a struct
always has the same address as the struct should do the trick.

The query-handler could use a macro-substitution service.

The existing nerd-channels should take a format-string to replace
macros and whatnot before shipping the data to its subscriber. It
should also print neater output by default.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked