[icinga-checkins] icinga.org: icinga-core/test/core: core: make command_check_interval= -1 equal to 5s instead of 60s, targetting as often as possible ( Andreas Ericsson) #1651

git at icinga.org git at icinga.org
Thu Jun 16 18:16:15 CEST 2011


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Jun 15 18:43:50 2011 +0200

core: make command_check_interval=-1 equal to 5s instead of 60s, targetting as often as possible (Andreas Ericsson) #1651

refs #1651

---

 Changelog        |    1 +
 base/events.c    |    2 +-
 include/icinga.h |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index 6e5d1c6..b71917d 100644
--- a/Changelog
+++ b/Changelog
@@ -14,6 +14,7 @@ FIXES
 * core: remove duplicated unlinks for check result files with multiple results #1615
 * core: fix retain status file over an init script reload #1579
 * core: fix freshness_threshold problem in host checks by using check_interval in HARD or OK state, else retry_interval (like service checks) #1331
+* core: make command_check_interval=-1 equal to 5s instead of 60s, targetting as often as possible (Andreas Ericsson) #1651
 
 * classic ui: fix cross site scripting vulnerability in config.cgi on config expander arguments #1605
 * classic ui: remove sidebar.html inclusion in index.html causing troubles on reload #1632
diff --git a/base/events.c b/base/events.c
index 633c58f..a8589d1 100644
--- a/base/events.c
+++ b/base/events.c
@@ -584,7 +584,7 @@ void init_timing_loop(void){
 	/* add an external command check event if needed */
 	if(check_external_commands==TRUE){
 		if(command_check_interval==-1)
-			interval_to_use=(unsigned long)60;
+			interval_to_use=(unsigned long)DEFAULT_EXTERNAL_COMMAND_CHECK_INTERVAL;
 		else
 			interval_to_use=(unsigned long)command_check_interval;
 		schedule_new_event(EVENT_COMMAND_CHECK,TRUE,current_time+interval_to_use,TRUE,interval_to_use,NULL,TRUE,NULL,NULL,0);
diff --git a/include/icinga.h b/include/icinga.h
index bdddb8a..74ac584 100644
--- a/include/icinga.h
+++ b/include/icinga.h
@@ -92,6 +92,7 @@ extern "C" {
 #define DEFAULT_OCHP_TIMEOUT					15	/* max time in seconds to wait for obsessive compulsive processing commands to complete */
 #define DEFAULT_PERFDATA_TIMEOUT                		5       /* max time in seconds to wait for performance data commands to complete */
 #define DEFAULT_TIME_CHANGE_THRESHOLD				900	/* compensate for time changes of more than 15 minutes */
+#define DEFAULT_EXTERNAL_COMMAND_CHECK_INTERVAL			5	/* check interval in seconds to be used, if set to -1 in icinga.cfg */
 
 #define DEFAULT_LOG_HOST_RETRIES				0	/* don't log host retries */
 #define DEFAULT_LOG_SERVICE_RETRIES				0	/* don't log service retries */





More information about the icinga-checkins mailing list