I found that is a bug from nagios, you can check documentation from this link.
You will find in file /etc/init.d/nagios
this code.
# Load any extra environment variables for Nagios and its plugins
if test -f /etc/sysconfig/nagios; then
. /etc/sysconfig/nagios
fi
Just create the file nagios
on the /etc/sysconfig/
path for Fedora or rhel with the extra variables that you 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.