check_oracle

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
skumar7466
Posts: 15
Joined: Wed May 22, 2013 3:38 am

check_oracle

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_oracle

Post by slansing »

Do you have the oracle home defined in your check_oracle plugin, or in:

Code: Select all

/etc/oratab
skumar7466
Posts: 15
Joined: Wed May 22, 2013 3:38 am

Re: check_oracle

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_oracle

Post 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'
skumar7466
Posts: 15
Joined: Wed May 22, 2013 3:38 am

Re: check_oracle

Post by skumar7466 »

where do i need to define you command...in nrpe.cfg (hpux end) or in nagios server end.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_oracle

Post 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.
Locked