cannot connect to install_driver(Oracle) failed
Posted: Wed Jan 24, 2018 5:25 pm
Hello -
I'm running Nagios Core 4.3.4 and trying to get some Oracle database checks going on a Linux box.
I've seen a few other people run into a similar problem on these boards, but I can't quite seem to figure out what the missing piece here is. I am trying to use the check_oracle_health to connect to an Oracle database in tnsping mode. From the command line, I can get the following to return an OK status:
However, from the Nagios web interface, I get the following:
I installed the Oracle 12.2 instant client, SDK and SQLPLUS (RPM versions) and then used CPAN to install DBD::Oracle module. I set the ORACLE_HOME, LD_LIBRARY_PATH environmental variables before installing the module via CPAN. The CPAN process seemed to complete without issue. I see Oracle.pm in /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle.pm.
This is outside the @INC locations mentioned in the failing Nagios web entry above but i can't figure out how to make Nagios aware of this additional location...or make my Oracle.pm appear in say /usr/share/perl5/vendor_perl.
I've seen the Nagios document for XI and installing Oracle checks, but I did those steps.
Any thoughts on what I'm missing? Thanks so much.
I'm running Nagios Core 4.3.4 and trying to get some Oracle database checks going on a Linux box.
I've seen a few other people run into a similar problem on these boards, but I can't quite seem to figure out what the missing piece here is. I am trying to use the check_oracle_health to connect to an Oracle database in tnsping mode. From the command line, I can get the following to return an OK status:
Code: Select all
/usr/lib64/nagios/plugins/custom/check_oracle_health --connect "name:port" --mode tnsping --
-user myuser --password mypassCode: Select all
CRITICAL - cannot connect to <DB_NAME>. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/lib64/nagios/plugins/custom /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) 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.
at /usr/lib64/nagios/plugins/custom/check_oracle_health line 4754.This is outside the @INC locations mentioned in the failing Nagios web entry above but i can't figure out how to make Nagios aware of this additional location...or make my Oracle.pm appear in say /usr/share/perl5/vendor_perl.
I've seen the Nagios document for XI and installing Oracle checks, but I did those steps.
Any thoughts on what I'm missing? Thanks so much.