Page 1 of 1

Re: [Nagios-devel] [PATCH] config.c notification_interval

Posted: Sun Sep 21, 2008 12:14 pm
by Guest
Marcel wrote:
> Hi there,
>
> I don't know if this solution would be the best solution to this problem,
> but I've patched config.c to correct a problem in verification of
> notification_interval versus check_interval, which when configuring
> "interval_length=1", the check of notification_interval versus
> check_interval issues wrong warning at nagios.log.
>
> Here is the patch:
>

Hi Marcel. First off; Well spotted. Thanks.

While I approve of obvious bugfix patches, I'm slightly against this
one anyway, as I believe a much better fix would be to keep the
interval_length a mere syntactic sugar for the configuration parsing.

Nagios would be better off storing all intervals as the actual number
of seconds between the two checks. In other words, the multiplication
should only ever happen when reading the configuration and all other
comparisons should look like this:

if (service->notification_interval check_interval)
/* bogus */ ;

Mucking around with interval length inside the core logic makes
for mistakes such as this one. I'll see if I can cook up a patch
that makes it so and then get Ethan to accept it.

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





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