NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
259 stars 133 forks source link

Document keep_env_vars #187

Open tatref opened 6 years ago

tatref commented 6 years ago

I'm trying to use a check that requires the LD_LIBRARY_PATH env variable to be set.

This was working on older nrpe version (2.7.1)

With the current version, the clean_environ function deletes those variables. However, it seems that the keep_env_vars config file flag should disable or alter this behaviour?

I tried setting keep_env_vars to:

None of theses are working

Could you give me some hint about this? Thanks!

hedenface commented 6 years ago

After reading clean_environ it looks like no matter what keep_env_vars is set to it only sets the following environment variables:

PATH
IFS
LOGNAME
USER
HOME
SHELL

But if you have LD_LIBRARY_PATH already set in /etc/environment and you specify it in the keep_env_vars it should not unset (via unsetenv() call).