don't log passive host_checks patch

Ethan Galstad nagios at nagios.org
Tue Aug 14 14:55:40 CEST 2007


Thanks!

Sven Strickroth wrote:
> Hi,
> 
> in the config-file there is written:
> "# If you don't want Nagios to log passive host and service checks..."
> But the regarding check in commands.c doesn't check for
> passive_host_checks. My attached patch should fix that (the patch is
> against 2.9, but should apply to cvs, too).
> 
> 
> 
> ------------------------------------------------------------------------
> 
> diff -Nur nagios-2.9-orig/base/commands.c nagios-2.9/base/commands.c
> --- nagios-2.9-orig/base/commands.c	2007-08-14 02:58:13.000000000 +0200
> +++ nagios-2.9/base/commands.c	2007-08-14 02:58:26.000000000 +0200
> @@ -563,7 +563,7 @@
>  		/* log the external command */
>  		snprintf(buffer,sizeof(buffer),"EXTERNAL COMMAND: %s;%s\n",command_id,args);
>  		buffer[sizeof(buffer)-1]='\x0';
> -		if(command_type==CMD_PROCESS_SERVICE_CHECK_RESULT){
> +		if(command_type==CMD_PROCESS_SERVICE_CHECK_RESULT || command_type==CMD_PROCESS_HOST_CHECK_RESULT){
>  			if(log_passive_checks==TRUE)
>  				write_to_all_logs(buffer,NSLOG_PASSIVE_CHECK);
>  		        }
> 


Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/




More information about the Developers mailing list