[icinga-checkins] icinga.org: icinga-core/test/core: remove wrong expiration calculation on freshness checks #2136

git at icinga.org git at icinga.org
Fri Jan 27 19:57:50 CET 2012


Module: icinga-core
Branch: test/core
Commit: 2208b714cc3a3e9257d474fd444000c6cc3c82f1
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=2208b714cc3a3e9257d474fd444000c6cc3c82f1

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Dec  1 21:02:26 2011 +0100

remove wrong expiration calculation on freshness checks #2136

this is a revert, and needs a proper fix, but will do for now.

refs #2136

---

 base/checks.c |   36 ------------------------------------
 1 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/base/checks.c b/base/checks.c
index 4d0552c..f23b469 100644
--- a/base/checks.c
+++ b/base/checks.c
@@ -2286,23 +2286,6 @@ int is_service_result_fresh(service *temp_service, time_t current_time, int log_
 	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 @@ int is_host_result_fresh(host *temp_host, time_t current_time, int log_this) {
 	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 */





More information about the icinga-checkins mailing list