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
Access lost to environment variables in 3.5.1.dfsg-2+b1
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Access lost to environment variables in 3.5.1.dfsg-2+b1
In your nagios.cfg file what is the value of enable_environment_macros ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Access lost to environment variables in 3.5.1.dfsg-2+b1
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
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
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Access lost to environment variables in 3.5.1.dfsg-2+b1
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.
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Access lost to environment variables in 3.5.1.dfsg-2+b1
Yes.When running env from the plugin, is that all that is returned, just the NAGIOS_ARG8=?
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.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
Do you mean resource.cfg $USERn$ macros? If not, could you clarify what you are implying by the "System User's Variable"?krpt wrote: it's System User's variable I can' t access no more
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Access lost to environment variables in 3.5.1.dfsg-2+b1
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
Odd. I am unsure what changed in the debian build. Could you post your full nagios.cfg?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.