Page 1 of 1

Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Thu Oct 30, 2014 4:25 am
by krpt
Hi there,

Running in debian sid, since our last maj from nagios3-core:amd64 3.5.1-1+b1 -> 3.5.1.dfsg-2+b1, we lost access to env variables in plugin ( we run nagios3 as the nagios user and we use env vars for some plugins ).

Echoing 'env' in a simple shell plugin ran by nagios gives the 'NAGIOS_ARG8= ' output.

After googling I tried sourcing a script before launching nagios and other things without any success.

Any help would be greatly appreciated, Thanks !!

Mike

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Thu Oct 30, 2014 7:35 pm
by Box293
In your nagios.cfg file what is the value of enable_environment_macros ?

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Fri Oct 31, 2014 5:26 am
by krpt
thx for trying to answer ;

enable_environment_macros=1

If I was not clear enough, it's System User's variable I can' t access no more, not macros defined in nagios

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Fri Oct 31, 2014 1:45 pm
by sreinhardt
When running env from the plugin, is that all that is returned, just the NAGIOS_ARG8=?
In addition to the env setting in nagios.cfg, what is the use_large_install_tweaks set to currently? This can override the enable_environment_macros setting if enabled, and disable env macros among other things.

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Fri Oct 31, 2014 5:40 pm
by krpt
When running env from the plugin, is that all that is returned, just the NAGIOS_ARG8=?
Yes.
In addition to the env setting in nagios.cfg, what is the use_large_install_tweaks set to currently? This can override the enable_environment_macros setting if enabled, and disable env macros among other things.
I'm away from the server so can't verify for sure, but that's not a setting we have modified as far as I know, It should be set to its default value.

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Mon Nov 03, 2014 4:26 pm
by abrist
krpt wrote: it's System User's variable I can' t access no more
Do you mean resource.cfg $USERn$ macros? If not, could you clarify what you are implying by the "System User's Variable"?

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Fri Nov 07, 2014 7:35 am
by krpt
I meant bashrc variables, variables displayed when typing 'env' in a shell. Used to work, now no more.

Re: Access lost to environment variables in 3.5.1.dfsg-2+b1

Posted: Fri Nov 07, 2014 3:17 pm
by abrist
Odd. I am unsure what changed in the debian build. Could you post your full nagios.cfg?