Page 1 of 2

check_oracle

Posted: Thu Jun 05, 2014 9:17 am
by hanya.radwan
hi,

on Nagios 2014 R1.0, oracle service failed as following:
[root@nms ~]# /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.txt --connect "10.100.1.176:1521/ppcalls" --username nagios_appl --password "m0n_4jawwalppcalls50937" --mode tablespace-usage --report short --warning 87 --critical 95
CRITICAL - cannot connect to 10.100.1.176:1521/ppcalls. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.12.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.txt line 4755

[root@nms ~]# telnet 10.100.1.176 1521
Trying 10.100.1.176...
Connected to 10.100.1.176.

Re: check_oracle

Posted: Thu Jun 05, 2014 9:40 am
by slansing
Is the DBD Oracle perl module installed?:

Code: Select all

cpan
Once in CPAN run-

Code: Select all

install DBD::Oracle

Re: check_oracle

Posted: Fri Jun 06, 2014 7:13 am
by hanya.radwan
I install oracle again:

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle//client64/lib ORACLE_HOME=/usr/lib/oracle//client64 /usr/local/nagios/libexec/check_oracle_health --connect "10.100.1.176:1521/ppcalls" --username nagios_appl --password "m0n_4jawwalppcalls50937" --mode sql --name 'select%20count%28%2A%29%20from%20v%24session%20where%20status%20%3D%20%27ACTIVE%27 ' --warning 300 --critical 400

CRITICAL - cannot connect to 10.100.1.176:1521/ppcalls. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 19) line 3
Compilation failed in require at (eval 19) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_oracle_health line 4755

Re: check_oracle

Posted: Fri Jun 06, 2014 10:46 am
by nealg
I'm experiencing the same issue after upgrading to NAGIOS XI 2014R1.1. Did we ever find a fix? I've read over the Oracle plugin Install document and everything looks good to me.

Re: check_oracle

Posted: Fri Jun 06, 2014 12:32 pm
by hanya.radwan
I tried again to install oracle plugin again, but the same problem still

Re: check_oracle

Posted: Fri Jun 06, 2014 12:35 pm
by nealg
IT was a path issues with the environment variables that changed somehow during the upgrade. Added a 64 to the end of of both variables for the command.

FROM: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client $USER1$/check_oracle_health $ARG1$

TO: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$

Re: check_oracle

Posted: Fri Jun 06, 2014 12:46 pm
by hanya.radwan
I did that, but the problem still

Re: check_oracle

Posted: Fri Jun 06, 2014 2:22 pm
by lmiltchev
Run the following commands and show us the output:

Code: Select all

yum list installed | grep oracle
whereis oracle
Go to CCM->Commands->type "oracle" in the "search" bar, hit "Enter" and show us a screenshot of this page.

Re: check_oracle

Posted: Sat Jun 07, 2014 11:29 am
by hanya.radwan
command.png
please find the result of the command:
[root@nms ~]# yum list installed | grep oracle
oracle-instantclient12.1-basic.x86_64 12.1.0.1.0-1 @/oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64
oracle-instantclient12.1-devel.x86_64 12.1.0.1.0-1 @/oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64
oracle-instantclient12.1-sqlplus.x86_64
12.1.0.1.0-1 @/oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64
[root@nms ~]# whereis oracle
oracle: /usr/lib/oracle /usr/include/oracle /usr/share/oracle
[root@nms ~]#

Re: check_oracle

Posted: Sat Jun 07, 2014 12:14 pm
by hanya.radwan
done after change oracle to 12.1