[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.6.0-1-2-g78aee58
Alexander Wirt
formorer at grml.org
Fri Dec 2 09:04:51 UTC 2011
The following commit has been merged in the master branch:
commit 804155e0efc78608dc9a73b16dc7670335cd862e
Author: Alexander Wirt <formorer at grml.org>
Date: Fri Dec 2 10:03:49 2011 +0100
Add a patch to fix expiration calculation (issue 2136)
diff --git a/debian/patches/80_fix_expiration_calculation.dpatch b/debian/patches/80_fix_expiration_calculation.dpatch
new file mode 100755
index 0000000..5dacfb3
--- /dev/null
+++ b/debian/patches/80_fix_expiration_calculation.dpatch
@@ -0,0 +1,60 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 80_fix_expiration_calculation.dpatch by Alexander Wirt <formorer at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for https://dev.icinga.org/issues/2136
+
+ at DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-icinga~/base/checks.c pkg-icinga/base/checks.c
+--- pkg-icinga~/base/checks.c 2011-11-30 15:42:17.000000000 +0100
++++ pkg-icinga/base/checks.c 2011-12-02 10:02:44.000000000 +0100
+@@ -2286,23 +2286,6 @@
+ else
+ expiration_time = (time_t)(temp_service->last_check + freshness_threshold);
+
+- /*
+- * ADDED 22-10-2011 MF, Patch by Andreas Ericsson
+- * If the check was last done passively, we assume it's going
+- * to continue that way and we need to handle the fact that
+- * Icinga might have been shut off for quite a long time. If so,
+- * we mustn't spam freshness notifications but use program_start_time
+- * instead of last_check to determine freshness expiration time.
+- * The threshold for "long time" is determined as 61.8% of the normal
+- * freshness threshold based on vast heuristical research (ie, "some
+- * guy once told me the golden ratio is good for loads of stuff").
+- */
+- if (temp_service->check_type == SERVICE_CHECK_PASSIVE) {
+- if (event_start < program_start + 60 && event_start - last_program_stop < (freshness_threshold * 0.618)) {
+- expiration_time = event_start + freshness_threshold;
+- }
+- }
+-
+ log_debug_info(DEBUGL_CHECKS, 2, "HBC: %d, PS: %lu, ES: %lu, LC: %lu, CT: %lu, ET: %lu\n", temp_service->has_been_checked, (unsigned long)program_start, (unsigned long)event_start, (unsigned long)temp_service->last_check, (unsigned long)current_time, (unsigned long)expiration_time);
+
+ /* the results for the last check of this service are stale */
+@@ -2706,25 +2689,6 @@
+ else
+ expiration_time = (time_t)(temp_host->last_check + freshness_threshold);
+
+- /*
+- * ADDED 22-10-2011 MF, Patch by Andreas Ericsson
+- * If the check was last done passively, we assume it's going
+- * to continue that way and we need to handle the fact that
+- * Icinga might have been shut off for quite a long time. If so,
+- * we mustn't spam freshness notifications but use program_start_time
+- * instead of last_check to determine freshness expiration time.
+- * The threshold for "long time" is determined as 61.8% of the normal
+- * freshness threshold based on vast heuristical research (ie, "some
+- * guy once told me the golden ratio is good for loads of stuff").
+- */
+- if (temp_host->check_type == HOST_CHECK_PASSIVE) {
+- if (event_start < program_start + 60 &&
+- event_start - last_program_stop < (freshness_threshold * 0.618))
+- {
+- expiration_time = event_start + freshness_threshold;
+- }
+- }
+-
+ log_debug_info(DEBUGL_CHECKS, 2, "HBC: %d, PS: %lu, ES: %lu, LC: %lu, CT: %lu, ET: %lu\n", temp_host->has_been_checked, (unsigned long)program_start, (unsigned long)event_start, (unsigned long)temp_host->last_check, (unsigned long)current_time, (unsigned long)expiration_time);
+
+ /* the results for the last check of this host are stale */
--
debian packaging of icinga(-core)
More information about the Pkg-nagios-changes
mailing list