Re: [Nagios-devel] [PATCH] Fix default value

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] [PATCH] Fix default value

Post by Guest »


On Jan 11, 2013, at 11:08 AM, Andreas Ericsson wrote:

> On 01/11/2013 02:43 PM, Ton Voon wrote:
>>=20
>> On 11 Jan 2013, at 12:17, Andreas Ericsson wrote:
>>=20
>>> On 01/10/2013 11:31 PM, Ton Voon wrote:
>>>> However, even with this set to true, it looks like Nagios 4
>>>> doesn't set the envvars. In host/service checks, it looks like no
>>>> envvars are set. Is there a technical reason why this is not
>>>> done, or is this a bug?
>>>>=20
>>>=20
>>> The technical reason is twofold: I'm lazy, and environment macros
>>> cause a lot of additional problems for anything but very small
>>> systems, while providing a mediocre benefit at best.
>>>=20
>>> The problem people have been seeing with Nagios 3 where certain
>>> checks fail to run when they add an extra service to a servicegroup
>>> is due to environment macros being enabled and the environment
>>> space being eaten.
>>>=20
>>> To enable them again means transferring the entire environment to
>>> the designated worker process, parsing it from there and setting it
>>> in a new heap which we pass to execvpe().
>>>=20
>>> Since we will always pay *all* overhead for all checks but very,
>>> very few of them use more than one or two of the variables set, the
>>> benefit really isn't worth the additional overhead.
>>=20
>> I think this "bug" is a blocker for upgrading to Nagios 4 since
>> certain checks/notification scripts/event handlers expect the
>> environment variables to be set.'

Really? I can't think of the last time I ran into a setup that the only wa=
y to use a check/script was as environment variables. It's way more effici=
ent, and I think easier, to just pass the few params you normally need as c=
ommand-line options. Even for things like Oracle I just set local env opti=
ons in the script or use one of the scripts that lets you pass in what ORAC=
LE_HOME and stuff should be.

Dan







This post was automatically imported from historical nagios-devel mailing list archives
Original poster: daniel.wittenberg.r0ko@statefarm.com
Locked