[Nagios-devel] Solaris 8 check executions fail

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

[Nagios-devel] Solaris 8 check executions fail

Post by Guest »

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3120827605_13153566
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit


After upgrading to Solaris 8, we discovered that any service/host checks
that were run with parentheses in the command line failed CRITICAL, with (No
output!).

Apparently, /bin/sh suddenly started caring about parens in command lines
after the upgrade.

For not quoting our argument strings, we are sufficiently chastened.

In the process of figuring this out, we added a "log_executions"
configuration directive, which will echo the check commands to nagios.log as
they are being run. It was invaluable to us, and we hope it finds its way
into CVS.

The patch is just the output of "cvs diff" in nagios/base, since the exact
rules for submitting patches are unclear.

The patch doesn't capture the following line in nagios.h, since it's subst'd
during make:

#define DEFAULT_EXECUTION_LOGGING 0 /* log execution events? 1=yes,
0=no */

Hope you find this as useful as we did.

-Gunnar

PS - ObFeatureRequest: It would be wonderful if STDERR and/or STDOUT could
be redirected from plugins to a file, to help debugging and tracing.


--B_3120827605_13153566
Content-type: application/octet-stream; name="log_executions.patch"
Content-disposition: attachment
Content-transfer-encoding: base64

PyBNYWtlZmlsZQo/IG5hZ2lvcy5oCj8gbmFnaW9zCj8gbG9nX2V4ZWN1dGlvbnMucGF0Y2gK
SW5kZXg6IGNoZWNrcy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnNyb290L25hZ2lv
cy9uYWdpb3MvYmFzZS9jaGVja3MuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xMgpkaWZm
IC1yMS4xMiBjaGVja3MuYwo0N2E0OAo+IGV4dGVybiBpbnQgICAgICBsb2dfZXhlY3V0aW9u
czsKMzk2YTM5OCw0MDIKPiAKPiAgICAgICAgICBpZiA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PT1UUlVFKT8iVFJVRSI6IkZBTFNFIik7Cj4gI2VuZGlmCj4gCQkg
ICAgICAgIH0KSW5kZXg6IG5hZ2lvcy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnNy
b290L25hZ2lvcy9uYWdpb3MvYmFzZS9uYWdpb3MuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24g
MS4xOApkaWZmIC1yMS4xOCBuYWdpb3MuYwoxNThhMTU5Cj4gaW50ICAgICAgICAgICAgIGxv
Z19leGVjdXRpb25zPURFRkFVTFRfRVhFQ1VUSU9OX0xPR0dJTkc7Owo=

--B_3120827605_13153566--







This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ghelleks@yahoo.com
Locked