Page 1 of 1

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

Posted: Tue Aug 14, 2007 2:58 am
by Guest
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig1942B73AFEFA9BAA9D92B9DE
Content-Type: multipart/mixed; boundary="------------090305030402090506090900"

This is a multi-part message in MIME format.
--------------090305030402090506090900
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

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).

--=20
Best regards,
Sven mailto:[email protected]
ClamAV, a GPL anti-virus toolkit http://www.clamav.net


--------------090305030402090506090900
Content-Type: text/plain;
name="passive_logging.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="passive_logging.patch"

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]=3D'\x0';
- if(command_type=3D=3DCMD_PROCESS_SERVICE_CHECK_RESULT){
+ if(command_type=3D=3DCMD_PROCESS_SERVICE_CHECK_RESULT || command_type=3D=
=3DCMD_PROCESS_HOST_CHECK_RESULT){
if(log_passive_checks=3D=3DTRUE)
write_to_all_logs(buffer,NSLOG_PASSIVE_CHECK);
}


--------------090305030402090506090900--

--------------enig1942B73AFEFA9BAA9D92B9DE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGwYsSFkZnpPWp1MQRAoGOAKDkPaTJVxkF2pLquFI1GzStEgLw/QCdHy00
14xtjCBs8a6WCWrq011LLRw=
=3Lio
-----END PGP SIGNATURE-----

--------------enig1942B73AFEFA9BAA9D92B9DE--





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