environment variables - Nagios doesn't get exports from /etc/profile -


i've got nagios , oracle sqlplus client installed on server. sqlplus needs few environment variables run, added exports /etc/profile.
login root sets variables right, login user nagios sets ok when run checks nagios web interface (these checks written in bash), end error error: empty result sqlplus. check plugin settings , oracle status.
when run these checks terminal root or nagios user, ok, that's how found out problem in env variables.

i glad suggestions.

i found bug nagios, can check documentation this link.

you find in file /etc/init.d/nagios code.

# load environment variables nagios , plugins if test -f /etc/sysconfig/nagios;        . /etc/sysconfig/nagios fi 

just create file nagios on /etc/sysconfig/ path fedora or rhel variables need. on case.

[root@server sysconfig]# cat nagios  export oracle_home=/usr/lib/oracle/11.2/client64 export tns_admin=$oracle_home/network/admin export path=$path:$oracle_home/bin export ld_library_path=$oracle_home/lib 

and that's it.

best regard marco.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -