Page 1 of 1

check_oracle

Posted: Thu May 30, 2013 7:44 am
by skumar7466
HI!

I have tried to check the database status in my db servers using the command below by setting the envirnment ORACLE_HOME.

Code: Select all

-bash-3.2# /opt/nrpe/libexec/check_oracle --tns GESS
OK - reply time 10 msec from GESS
It worked.

If i am checking it from nagios server as

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.1.14.18 -c check_oracle
Cannot determine ORACLE_HOME for sid GESS
Getting error as above..even i configured in nrpe.cfg as

Code: Select all

command[check_oracle]=/opt/nrpe/libexec/check_oracle --tns GESS

Re: check_oracle

Posted: Thu May 30, 2013 10:09 am
by slansing
Do you have the oracle home defined in your check_oracle plugin, or in:

Code: Select all

/etc/oratab

Re: check_oracle

Posted: Thu May 30, 2013 10:57 pm
by skumar7466
There is no file /etc/oratab. OS is HPUX 11iV3 i defined the ORACLE_HOME is NRPE user's profile, so its working in local server not in nagios server..I couldnt find where is the issue.

Re: check_oracle

Posted: Fri May 31, 2013 10:19 am
by slansing
Have you tried using check_oracle_health? It is a highly supported plugin alternative to the depreciated one you are running with, if this is not an option that's fine:

http://assets.nagios.com/downloads/nagi ... lation.pdf

For check_oracle, as the help portion suggests, you can load the environment on the fly as well, fill in the following with your information:

Code: Select all

./check_oracle --tablespace $ARG1$ --sid $ARG2$ --user $ARG3$ --password $ARG4$ --warning $ARG5$ --critical $ARG6$ --environment LD_LIBRARY_PATH='/tmp/oracle/lib'

Re: check_oracle

Posted: Mon Jun 03, 2013 4:03 am
by skumar7466
where do i need to define you command...in nrpe.cfg (hpux end) or in nagios server end.

Re: check_oracle

Posted: Mon Jun 03, 2013 11:14 am
by slansing
We always recommend you make sure a command runs from the command line before adding it to a configuration. You also need to go through the document I linked above before attempting to connect to your oracle server, it was designed for XI but the same rules apply. The command I linked was not complete, you still need to define the address to connect to, etc, this should all be covered in the document. But we can help you once you have questions regarding it. "excluding the wizard portion of course."

For the check_oracle command above, please let us know what it returns from the command line, with any additional information you have filled in from your end.