[PATCH] config.c notification_interval vs check_interval check assuming wrong interval_length

Marcel webknowledge at gmail.com
Thu Sep 11 22:00:34 CEST 2008


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

HTH,
Marcel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080911/12012174/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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=/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list