Re: [Nagios-devel] don't log passive host_checks patch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] don't log passive host_checks patch

Post by Guest »

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: [email protected]
Website: http://www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked