Can't locate DBD/Oracle.pm in @INC...
Posted: Fri Nov 27, 2015 9:07 am
Hi,
On a EL7 I installed an offline version of nagiosxi 5.2.0 - so far so good.
I also installed the check_oracle_health plugin with the neccessary oracle-instantclient-basic, -sqlplus, and devel-... rpms
and did some tests as root:
Proper environment with
$ORACLE_HOME=/usr/lib/oracle/12.1/client64/
$PATH=$PATH:$ORACLE_HOME/bin
$LD_LIBRARY_PATH=$ORACLE_HOME/lib
/usr/local/nagios/libexec/check_oracle_health --connect '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01)))' --user monitor --password egal --mode tnsping
with the following output:
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 4162.
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 6166.
OK - connection established to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01))).
When I tried this as user nagios, I got the following in return:
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 4162.
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 6166.
CRITICAL - cannot connect to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01))). install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /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, mysql.
at /usr/local/nagios/libexec/check_oracle_health line 4755.
Needless to say: I set the same environment variables as I do as root.
When I doublechecked the PERL installation of DBD::Oracle I got
Reading '/root/.cpan/Metadata'
Database was generated on Fri, 27 Nov 2015 06:17:02 GMT
DBD::Oracle is up to date (1.74).
Second: If I tried to configure an Oracle plugin with the wizzard, I can enter the data (host, port, login cred., tablespacename) to check a tablespace, but after applying and a long, long time waiting, I only got the error "Reset Config Permissions Failed". I checked this forum and several sources on the internet, but I did not found a "build-perms-bin" scripts inside my xi-latest or offline packages.
So any help or a link, where I can check my permissions or howto check, what's wrong with the perl module would be nice...
On a EL7 I installed an offline version of nagiosxi 5.2.0 - so far so good.
I also installed the check_oracle_health plugin with the neccessary oracle-instantclient-basic, -sqlplus, and devel-... rpms
and did some tests as root:
Proper environment with
$ORACLE_HOME=/usr/lib/oracle/12.1/client64/
$PATH=$PATH:$ORACLE_HOME/bin
$LD_LIBRARY_PATH=$ORACLE_HOME/lib
/usr/local/nagios/libexec/check_oracle_health --connect '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01)))' --user monitor --password egal --mode tnsping
with the following output:
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 4162.
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 6166.
OK - connection established to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01))).
When I tried this as user nagios, I got the following in return:
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 4162.
Use of qw(...) as parentheses is deprecated at /usr/local/nagios/libexec/check_oracle_health line 6166.
CRITICAL - cannot connect to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01))). install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /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, mysql.
at /usr/local/nagios/libexec/check_oracle_health line 4755.
Needless to say: I set the same environment variables as I do as root.
When I doublechecked the PERL installation of DBD::Oracle I got
Reading '/root/.cpan/Metadata'
Database was generated on Fri, 27 Nov 2015 06:17:02 GMT
DBD::Oracle is up to date (1.74).
Second: If I tried to configure an Oracle plugin with the wizzard, I can enter the data (host, port, login cred., tablespacename) to check a tablespace, but after applying and a long, long time waiting, I only got the error "Reset Config Permissions Failed". I checked this forum and several sources on the internet, but I did not found a "build-perms-bin" scripts inside my xi-latest or offline packages.
So any help or a link, where I can check my permissions or howto check, what's wrong with the perl module would be nice...