Setting up Oracle database Monitoring - facing issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Setting up Oracle database Monitoring - facing issue

Post 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
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Setting up Oracle database Monitoring - facing issue

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Setting up Oracle database Monitoring - facing issue

Post by maxwellmiranda »

it didnot complete successfully...i am attaching the output of the CPAN command in the word file.
CPAN error.docx
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Setting up Oracle database Monitoring - facing issue

Post 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?)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Setting up Oracle database Monitoring - facing issue

Post 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
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Setting up Oracle database Monitoring - facing issue

Post by maxwellmiranda »

can you direct me to some documentation to setup oracle database monitoring.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Setting up Oracle database Monitoring - facing issue

Post 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...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Setting up Oracle database Monitoring - facing issue

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Setting up Oracle database Monitoring - facing issue

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Setting up Oracle database Monitoring - facing issue

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