Page 1 of 3

Setting up Oracle database Monitoring - facing issue

Posted: Wed Apr 11, 2012 2:08 pm
by maxwellmiranda
we are facing issue while setting up Oracle monitoring plugin in Nagios XI.
we are getting following error

CRITICAL - cannot connect to dgdev1:1521. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site

this is a known error and it has been mentioned in the oracle plugin installation guide
we followed the instructions that were mentioned in the oracle plugin guide but that didnot fix the problem.

we are in the process of evaluating this product for our database and infrastructure monitoring. getting pass through this error is very important for evaluating this product.

can you help us in getting this fixed.

i am attaching the screenshot in the attachment with this support request.
we have installed the latest version of Nagios XI NagiosĀ® Coreā„¢ 3.2.3 on the Linux OS

second request is how can i set up monitoring using our custom scripts. currently we use the wizard to set up monitoring.
Nagios- oracle_plugin error.docx

Re: Setting up Oracle database Monitoring - facing issue

Posted: Wed Apr 11, 2012 2:22 pm
by scottwilkerson
Did you add your LD_LIBRARY_PATH and ORACLE_HOME to the commands as the document describes?

When you ran this

Code: Select all

export ORACLE_HOME=<path to your Oracle which was given by the script>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
cpan -i DBD::Oracle
Did CPAN say it was installed successfully?

Re: Setting up Oracle database Monitoring - facing issue

Posted: Wed Apr 11, 2012 3:12 pm
by maxwellmiranda
it didnot complete successfully...i am attaching the output of the CPAN command in the word file.
CPAN error.docx

Re: Setting up Oracle database Monitoring - facing issue

Posted: Wed Apr 11, 2012 3:31 pm
by scottwilkerson
I'm not an expert on this but it looks like it cannot connect to your ORACLE database...

Also I noted the following in the attached logs it is stating:
Remember to actually *READ* the README file! Especially if you have any problems.
and
*** If you have problems...
read all the log printed above, and the README and README.help.txt files.
(Of course, you have read README by now anyway, haven't you?)

Re: Setting up Oracle database Monitoring - facing issue

Posted: Thu Apr 12, 2012 10:47 am
by maxwellmiranda
i went through the readme files. however i did not find any valuable information that could resolve the issue that i am facing

Re: Setting up Oracle database Monitoring - facing issue

Posted: Thu Apr 12, 2012 3:05 pm
by maxwellmiranda
can you direct me to some documentation to setup oracle database monitoring.

Re: Setting up Oracle database Monitoring - facing issue

Posted: Thu Apr 12, 2012 4:40 pm
by scottwilkerson
This is the guide we have
http://assets.nagios.com/downloads/nagi ... lation.pdf

Have you tried running the plugin from the command line? Is this where you were seeing the error?

Code: Select all

cd /usr/local/nagios/libexec
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "<SERVER_ADDRESS>:1521" --username <USERNAME> --password "<PASSWORD>" --mode connection-time --warning 1 --critical 5 
A would still guess the problem is that DBD::Oracle isn't installed correctly...

Re: Setting up Oracle database Monitoring - facing issue

Posted: Fri Apr 13, 2012 9:45 am
by maxwellmiranda
i have checked it from the command line.. i am getting the same error.

nagmon:/users/nagios> cd /usr/local/nagios/libexec
nagmon:/usr/local/nagios/libexec> /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "dgdev1:1521" --username system --password "*****" --mode connection-time --warning 1 --critical 5
CRITICAL - cannot connect to dgdev1:1521. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 13) line 3.
Perhaps the DBD::Oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'Oracle' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.
at /usr/local/nagios/libexec/check_oracle_health line 4755



i have referred to the same document as mentioned by you for the oracle plugin installation...even after setting up the environment variable..we are still facing the error
DBD::Oracle perl module hasn't been fully installed

Re: Setting up Oracle database Monitoring - facing issue

Posted: Fri Apr 13, 2012 10:18 am
by scottwilkerson
Lets do this

Code: Select all

locate Oracle.pm
If it returns nothing, then it isn't installed and you will need to try again to install it from cpan.

One thing of note, the test's on your previous install show:


A little research on the Internet seems to point to not having set the ORACLE_SID environment variable.

Code: Select all

export ORACLE_SID=orcl
where orcl is the database name (orcl is the default)

Once that is set you would need to run the cpan install again

Code: Select all

cpan -i DBD::Oracle

Re: Setting up Oracle database Monitoring - facing issue

Posted: Fri Apr 13, 2012 10:29 am
by maxwellmiranda
the database i am monitoring is on a different server.
i have installed the oracle plugin on the nagios server.

do i still have to set the ORACLE_SID......

what would be the value for ORACLE_SID if want to monitor multiple ORACLE database on different servers