error in oracle health check script

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

error in oracle health check script

Post by maxwellmiranda »

i am getting following error while setting up oracle database monitoring service on nagios XI on Linux REHL 6.2

/usr/bin/env TNS_ADMIN=/usr/lib/oracle/11.2/client64/network/admin LD_LIBRARY_PATH=LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = sblhau.bose.com)(PORT = 1521)))(CONNECT_DATA =(SID = SBLPRD)))" --username *****--password "*****" --mode tnsping
<
CRITICAL - cannot connect to (DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = sblhau.bose.com)(PORT = 1521)))(CONNECT_DATA =(SID = SBLPRD))). install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 18) line 3
Compilation failed in require at (eval 18) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_oracle_health line 4755
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: error in oracle health check script

Post by maxwellmiranda »

i tried the fix mentioned in the oracle plugin installation document but it did not work
the fix in the document is as follows

Common Problems
Nagios reports CRITICAL with the message:
“install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module
DBD::Oracle: libocci.so.11.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-threadmulti/
DynaLoader.pm line 230.”
This problem is due to environment variable not being set properly. This Oracle plugin relies on these environment variables being set.
Make you have probably set the variables as indicated above. Also verify that the proper path is being given. Usual paths are:
x86: /usr/lib/oracle/<YOUR ORACLE VERSION>/client
x86_64: /usr/lib64/oracle/<YOUR ORACLE VERSION>/client
See the section about editing the env variables of the services. Make sure the env variables are set to proper value. These can be
verified by actually going to them on the command line.
Nagios gives this error:
CRITICAL - cannot connect to 192.168.5.55: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/perl
This is due to the Perl module not being installed properly. To remedy this problem, execute the following from the command line:
export ORACLE_HOME=<path to your Oracle which was given by the script>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
cpan -i DBD::Oracle
Page
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: error in oracle health check script

Post by scottwilkerson »

Can you run the following and post the output

Code: Select all

locate DynaLoader.pm
Also, you did execute the ./oracleinstall.sh like the document said correct?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: error in oracle health check script

Post by maxwellmiranda »

following is the output

sudo locate DynaLoader.pm
/usr/lib64/perl5/DynaLoader.pm
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: error in oracle health check script

Post by scottwilkerson »

I'm sorry I read the error wrong, run

Code: Select all

locate Oracle.so
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: error in oracle health check script

Post by maxwellmiranda »

nagprod:/home/nagios> locate Oracle.so
/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: error in oracle health check script

Post by scottwilkerson »

Did you run the following?

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

Re: error in oracle health check script

Post by maxwellmiranda »

yes as mentioned in my earlier post...we have executed the commands you mentioned
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: error in oracle health check script

Post by scottwilkerson »

Just to verify, did you receive any errors when running the commands?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: error in oracle health check script

Post by maxwellmiranda »

NO
Locked