Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
vi /usr/local/nagios/etc/nrpe.cfg
command[check_tnsping]=/usr/local/nagios/libexec/check_oracle_health --connect localhost --environment ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe --user nagios --password oradbmon --mode tnsping
command[check_flra]=/usr/local/nagios/libexec/check_oracle_health --connect XE --environment ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe --user nagios --password oradbmon --mode flash-recovery-area-usage
command[check_sga]=/usr/local/nagios/libexec/check_oracle_health --connect XE --environment ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe --user nagios --password oradbmon --mode sga-shared-pool-free
command[check_tablespaces]=/usr/local/nagios/libexec/check_oracle_health --connect XE --user nagios --password oradbmon --environment ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe --mode tablespace-usage

You may have to prepend LD_LIBRARY_PATH as explained above.

Test on Nagios server

Replace the "yourserver.yourdomain.tld" with the IP address or IP name of your Oracle server:

/usr/local/nagios/libexec/check_nrpe -H yourserver.yourdomain.tld -c check_tablespaces

Common Errors

You may have forgotten to prepend LD_LIBRARY_PATH - as an alternative, you can add it the the default environment script for the user running the nagios checks (most probably "nagios"). 

Check that $ORACLE_HOME/network/admin/tnsnames.ora is world readable.