[icinga-checkins] icinga.org: icinga-core/rdarrud/core: - Added warning messages if execute_host_checks and/ or execute_service_checks are 0, these will be printed to icinga log and syslog(if enabled).

git at icinga.org git at icinga.org
Wed Jan 5 21:10:19 CET 2011


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

Author: Rune Darrud <theflyingcorpse at gmail.com>
Date:   Thu Jan  6 01:02:15 2011 +0100

- Added warning messages if execute_host_checks and/or execute_service_checks are 0, these will be printed to icinga log and syslog(if enabled).

Resolves #929

---

 base/config.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/base/config.c b/base/config.c
index 8643da5..339c250 100644
--- a/base/config.c
+++ b/base/config.c
@@ -942,14 +942,22 @@ int read_main_config_file(char *main_config_file){
 		else if(!strcmp(variable,"enable_notifications"))
 			enable_notifications=(atoi(value)>0)?TRUE:FALSE;
 
-		else if(!strcmp(variable,"execute_service_checks"))
+		else if(!strcmp(variable,"execute_service_checks")){
 			execute_service_checks=(atoi(value)>0)?TRUE:FALSE;
+			if(execute_service_checks==FALSE){
+				logit(NSLOG_VERIFICATION_WARNING,TRUE,"Warning: Execute service checks are globally disabled!");
+				}
+			}
 
 		else if(!strcmp(variable,"accept_passive_service_checks"))
 			accept_passive_service_checks=(atoi(value)>0)?TRUE:FALSE;
 
-		else if(!strcmp(variable,"execute_host_checks"))
+		else if(!strcmp(variable,"execute_host_checks")){
 			execute_host_checks=(atoi(value)>0)?TRUE:FALSE;
+			if(execute_host_checks==FALSE){
+                                logit(NSLOG_VERIFICATION_WARNING,TRUE,"Warning: Execute host checks are globally disabled!");
+                                }
+			}
 
 		else if(!strcmp(variable,"accept_passive_host_checks"))
 			accept_passive_host_checks=(atoi(value)>0)?TRUE:FALSE;





More information about the icinga-checkins mailing list