[PATCH] config.c notification_interval vs check_interval check assuming wrong interval_length
Hendrik Bäcker
andurin at process-zero.de
Fri Sep 12 09:57:43 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Marcel,
Marcel schrieb:
> 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:
>
> $ nagios/base> diff -Nur config.c my_config.c
> --- config.c 2008-09-11 19:53:08.000000000 +0000
> +++ my_config.c 2008-09-11 19:53:42.000000000 +0000
> @@ -1875,7 +1875,7 @@
> }
>
> /* see if the notification interval is less than the
> check interval */
> -
> if(temp_service->notification_interval<temp_service->check_interval &&
> temp_service->notification_interval!=0){
> +
> if(temp_service->notification_interval<temp_service->check_interval*(interval_length/60)
> && temp_service->notification_interval!=0){
> logit(NSLOG_VERIFICATION_WARNING,TRUE,"Warning:
> Service '%s' on host '%s' has a notification interval less than its
> check interval! Notifications are only re-sent after checks are made,
> so the effective notification interval will be that of the check
> interval.",temp_service->description,temp_service->host_name);
> warnings++;
> }
> $ nagios/base>
>
> Please evaluate the workaround, I've successfully applied the patch and
> got rid of annoying warning messages at nagios.log
>
is this against the latest cvs code?
Regards,
Hendrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkjKIPcACgkQlI0PwfxLQjn2xQCfRzt+z0Rr+wgim9O0pbzcCx7D
yP8Ani2Xx/M1yjRoKczOkCiW4v6cG5Xj
=Q4tL
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
More information about the Developers
mailing list