Seeing the following error:
Code: Select all
Cannot determine ORACLE_HOME for sid carc_db/mydomain_carcdb@v08oracle.mydomain.org/carcdb
Code: Select all
nagios@v07-monitoring:/$ /usr/local/libexec/check_oracle --connect carc_db/mydomain_carcdb@v08oracle.mydomain.org
OK - login successful
nagios@v07-monitoring:/$ /usr/local/libexec/check_oracle --connect carc_db/lh4s4_carcdb@v08oracle.lhasalimited.org/carcdb
OK - login successful
Code: Select all
nagios@v07-monitoring:/$ echo $ORACLE_HOME
/usr/lib/oracle/12.1/client64
nagios@v07-monitoring:/$ printenv
LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
LESSCLOSE=/usr/bin/lesspipe %s %s
LANG=en_US.UTF-8
ORACLE_HOME=/usr/lib/oracle/12.1/client64
OLDPWD=/etc/adagiosconf/objects/hosts
USER=nagios
PWD=/
HOME=/home/nagios
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
MAIL=/var/mail/nagios
TERM=xterm
SHELL=/bin/bash
TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin
SHLVL=2
LOGNAME=nagios
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
LESSOPEN=| /usr/bin/lesspipe %s
_=/usr/bin/printenv
- Changing from root to nagios or www-data user:group did not fix the issue:
root@v07-monitoring:/usr/lib# chown nagios: oracle/ -R
root@v07-monitoring:/usr/lib# chown www-data: oracle/ -R
- Adding / to end of ORACLE_HOME did not fix the issue.
- Adding $ORACLE_HOME/bin to PATH did not fix the issue.
- Adding the variables to /etc/environment and /etc/profile did not fix issue
- Adding /usr/lib and $ORACLE_HOME/bin to PATH did not fix the issue
What am I missing?
Only solution I can't see to get to work is the bottom of this one: https://monitoring-portal.org/woltlab/i ... alpha-red/
How do I add variables to the check_oracle file without breaking the file? Nagios complains when I put ORACLE_HOME or PATH in it.
Contents of /etc/adagiosconf/objects/commands/check_oracle.cfg
Code: Select all
define command {
command_name check_oracle
command_line $USER1$/check_oracle $ARG1$
}