First, I took this nagios server as a new employee and have no clue how do I contact the nagios XI support even though we own the license. So I am putting this in the general forum. I would appreciate if you can tell me how do I post in Nagios XI customer forum.
License Type: Host-Based
Number of Licensed Hosts: Unlimited
Maintenance Status: Current (Expires in 395 days on 2017-04-03)
Here is my issue:
I am unable to execute this plugin and getting the Can't locate DBD/Oracle/Object.pm in @INC error. Here is the issue in details:
[root@nagiosxxx xxxxxx]# uname -a
Linux nagiosxxx 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@nagiosxxx xxxxxx]# echo $LD_LIBRARY_PATH
/usr/lib/oracle/11.2/client/lib
[root@nagiosxxx xxxxxx]# echo $ORACLE_HOME
/usr/lib/oracle/11.2/client
[root@nagiosxxx xxxxxx]# sudo /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 'oracleserver.domain.com:1521/oraclesid' --username 'oracleuser' --password '************' --mode sql --name="select count\(\*\) from v\\\$session where status = "active"" --warning 50 --critical 200
CRITICAL - cannot connect to oracleserver.domain.com:1521/oraclesid. install_driver(Oracle) failed: Can't locate DBD/Oracle/Object.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 /usr/lib64/perl5/DBD/Oracle.pm line 23.
BEGIN failed--compilation aborted at /usr/lib64/perl5/DBD/Oracle.pm line 23.
Compilation failed in require at (eval 19) line 3.
Perhaps a module that DBD::Oracle requires hasn't been fully installed
at /usr/local/nagios/libexec/check_oracle_health line 4755
[root@nagiosxxx xxxxxx]# cpan
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[1]> m DBD
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
Database was generated on Fri, 04 Mar 2016 13:29:02 GMT
Module id = DBD
CPAN_USERID GMPASSOS (Graciliano Monteiro Passos <[email protected]>)
CPAN_VERSION 1.0
CPAN_FILE G/GM/GMPASSOS/HDB-1.05.tar.gz
INST_FILE (not installed)
cpan[2]> m DBI
Module id = DBI
CPAN_USERID TIMB (Tim Bunce <[email protected]>)
CPAN_VERSION 1.634
CPAN_FILE T/TI/TIMB/DBI-1.634.tar.gz
MANPAGE DBI - Database independent interface for Perl
INST_FILE /usr/local/lib64/perl5/DBI.pm
INST_VERSION 1.633
cpan[3]> m DBD::Oracle
Module id = DBD::Oracle
CPAN_USERID PYTHIAN (Pythian Remote DBA <pause-at-pythian.com>)
CPAN_VERSION 1.74
CPAN_FILE P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz
UPLOAD_DATE 2014-04-25
MANPAGE DBD::Oracle - Oracle database driver for the DBI module
INST_FILE /usr/lib64/perl5/DBD/Oracle.pm
INST_VERSION 1.74
cpan[4]>
check_oracle_health Can't locate DBD/Oracle/Object.pm
Re: check_oracle_health Can't locate DBD/Oracle/Object.pm
Take a look at the installation instructions for the Oracle plugin. There are trouble shooting steps for that error.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
If that doesn't work, can you run the following and post the output?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
If that doesn't work, can you run the following and post the output?
Code: Select all
ls -lR /usr/lib64/perl5/DBD/
ls -lR /usr/local/lib64/perl5/DBD/Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_oracle_health Can't locate DBD/Oracle/Object.pm
Thank you for your response. Looks like this machine already has the oracle client installed.
Here is the output of the command you requested:
ls -lR /usr/lib64/perl5/DBD/
/usr/lib64/perl5/DBD/:
total 444
-rw-r--r--. 1 root root 42882 Jan 31 2008 DBM.pm
-rw-r--r--. 1 root root 12323 Sep 27 2007 ExampleP.pm
-rw-r--r--. 1 root root 24211 Jun 5 2009 File.pm
drwxr-xr-x. 4 root root 4096 Feb 23 2015 Gofer
-rw-r--r--. 1 root root 48722 Dec 8 2009 Gofer.pm
drwxr-xr-x. 2 root root 4096 Feb 23 2015 mysql
-rw-r--r--. 1 root root 57165 Dec 9 2009 mysql.pm
-rw-r--r--. 1 root root 3761 Jun 14 2007 NullP.pm
-rw-r--r--. 1 root root 205226 Feb 24 2015 Oracle.pm
-rw-r--r--. 1 root root 29045 Oct 10 2007 Proxy.pm
-rw-r--r--. 1 root root 7983 Sep 26 2007 Sponge.pm
/usr/lib64/perl5/DBD/Gofer:
total 8
drwxr-xr-x. 2 root root 4096 Feb 23 2015 Policy
drwxr-xr-x. 2 root root 4096 Feb 23 2015 Transport
/usr/lib64/perl5/DBD/Gofer/Policy:
total 20
-rw-r--r--. 1 root root 5140 Oct 16 2007 Base.pm
-rw-r--r--. 1 root root 2148 Oct 16 2007 classic.pm
-rw-r--r--. 1 root root 1477 Oct 16 2007 pedantic.pm
-rw-r--r--. 1 root root 2639 Oct 16 2007 rush.pm
/usr/lib64/perl5/DBD/Gofer/Transport:
total 40
-rw-r--r--. 1 root root 12793 Feb 24 2009 Base.pm
-rw-r--r--. 1 root root 2814 Oct 16 2007 null.pm
-rw-r--r--. 1 root root 7343 Oct 16 2007 pipeone.pm
-rw-r--r--. 1 root root 9177 Mar 10 2008 stream.pm
/usr/lib64/perl5/DBD/mysql:
total 40
-rw-r--r--. 1 root root 16095 Sep 14 2009 GetInfo.pm
-rw-r--r--. 1 root root 22221 Sep 14 2009 INSTALL.pod
---
ls -lR /usr/local/lib64/perl5/DBD/
/usr/local/lib64/perl5/DBD/:
total 212
-r--r--r--. 1 root root 52096 Sep 8 2013 DBM.pm
-r--r--r--. 1 root root 12293 Nov 14 2013 ExampleP.pm
drwxr-xr-x. 2 root root 4096 Feb 24 2015 File
-r--r--r--. 1 root root 40711 Dec 11 2014 File.pm
drwxr-xr-x. 4 root root 4096 Feb 24 2015 Gofer
-r--r--r--. 1 root root 49070 Feb 5 2014 Gofer.pm
-r--r--r--. 1 root root 4461 Nov 14 2013 NullP.pm
-r--r--r--. 1 root root 29211 Sep 21 2014 Proxy.pm
-r--r--r--. 1 root root 7938 Jun 24 2013 Sponge.pm
/usr/local/lib64/perl5/DBD/File:
total 40
-r--r--r--. 1 root root 20598 Apr 4 2013 Developers.pod
-r--r--r--. 1 root root 5012 Apr 4 2013 HowTo.pod
-r--r--r--. 1 root root 5947 Apr 4 2013 Roadmap.pod
/usr/local/lib64/perl5/DBD/Gofer:
total 8
drwxr-xr-x. 2 root root 4096 Feb 24 2015 Policy
drwxr-xr-x. 2 root root 4096 Feb 24 2015 Transport
/usr/local/lib64/perl5/DBD/Gofer/Policy:
total 20
-r--r--r--. 1 root root 5089 Jun 24 2013 Base.pm
-r--r--r--. 1 root root 2106 Jun 24 2013 classic.pm
-r--r--r--. 1 root root 1435 Jun 24 2013 pedantic.pm
-r--r--r--. 1 root root 2597 Jun 24 2013 rush.pm
/usr/local/lib64/perl5/DBD/Gofer/Transport:
total 44
-r--r--r--. 1 root root 12755 Jun 24 2013 Base.pm
-r--r--r--. 1 root root 3356 Apr 4 2013 corostream.pm
-r--r--r--. 1 root root 2770 Jun 24 2013 null.pm
-r--r--r--. 1 root root 7299 Jun 24 2013 pipeone.pm
-r--r--r--. 1 root root 9248 Jun 24 2013 stream.pm
Thank you.
Here is the output of the command you requested:
ls -lR /usr/lib64/perl5/DBD/
/usr/lib64/perl5/DBD/:
total 444
-rw-r--r--. 1 root root 42882 Jan 31 2008 DBM.pm
-rw-r--r--. 1 root root 12323 Sep 27 2007 ExampleP.pm
-rw-r--r--. 1 root root 24211 Jun 5 2009 File.pm
drwxr-xr-x. 4 root root 4096 Feb 23 2015 Gofer
-rw-r--r--. 1 root root 48722 Dec 8 2009 Gofer.pm
drwxr-xr-x. 2 root root 4096 Feb 23 2015 mysql
-rw-r--r--. 1 root root 57165 Dec 9 2009 mysql.pm
-rw-r--r--. 1 root root 3761 Jun 14 2007 NullP.pm
-rw-r--r--. 1 root root 205226 Feb 24 2015 Oracle.pm
-rw-r--r--. 1 root root 29045 Oct 10 2007 Proxy.pm
-rw-r--r--. 1 root root 7983 Sep 26 2007 Sponge.pm
/usr/lib64/perl5/DBD/Gofer:
total 8
drwxr-xr-x. 2 root root 4096 Feb 23 2015 Policy
drwxr-xr-x. 2 root root 4096 Feb 23 2015 Transport
/usr/lib64/perl5/DBD/Gofer/Policy:
total 20
-rw-r--r--. 1 root root 5140 Oct 16 2007 Base.pm
-rw-r--r--. 1 root root 2148 Oct 16 2007 classic.pm
-rw-r--r--. 1 root root 1477 Oct 16 2007 pedantic.pm
-rw-r--r--. 1 root root 2639 Oct 16 2007 rush.pm
/usr/lib64/perl5/DBD/Gofer/Transport:
total 40
-rw-r--r--. 1 root root 12793 Feb 24 2009 Base.pm
-rw-r--r--. 1 root root 2814 Oct 16 2007 null.pm
-rw-r--r--. 1 root root 7343 Oct 16 2007 pipeone.pm
-rw-r--r--. 1 root root 9177 Mar 10 2008 stream.pm
/usr/lib64/perl5/DBD/mysql:
total 40
-rw-r--r--. 1 root root 16095 Sep 14 2009 GetInfo.pm
-rw-r--r--. 1 root root 22221 Sep 14 2009 INSTALL.pod
---
ls -lR /usr/local/lib64/perl5/DBD/
/usr/local/lib64/perl5/DBD/:
total 212
-r--r--r--. 1 root root 52096 Sep 8 2013 DBM.pm
-r--r--r--. 1 root root 12293 Nov 14 2013 ExampleP.pm
drwxr-xr-x. 2 root root 4096 Feb 24 2015 File
-r--r--r--. 1 root root 40711 Dec 11 2014 File.pm
drwxr-xr-x. 4 root root 4096 Feb 24 2015 Gofer
-r--r--r--. 1 root root 49070 Feb 5 2014 Gofer.pm
-r--r--r--. 1 root root 4461 Nov 14 2013 NullP.pm
-r--r--r--. 1 root root 29211 Sep 21 2014 Proxy.pm
-r--r--r--. 1 root root 7938 Jun 24 2013 Sponge.pm
/usr/local/lib64/perl5/DBD/File:
total 40
-r--r--r--. 1 root root 20598 Apr 4 2013 Developers.pod
-r--r--r--. 1 root root 5012 Apr 4 2013 HowTo.pod
-r--r--r--. 1 root root 5947 Apr 4 2013 Roadmap.pod
/usr/local/lib64/perl5/DBD/Gofer:
total 8
drwxr-xr-x. 2 root root 4096 Feb 24 2015 Policy
drwxr-xr-x. 2 root root 4096 Feb 24 2015 Transport
/usr/local/lib64/perl5/DBD/Gofer/Policy:
total 20
-r--r--r--. 1 root root 5089 Jun 24 2013 Base.pm
-r--r--r--. 1 root root 2106 Jun 24 2013 classic.pm
-r--r--r--. 1 root root 1435 Jun 24 2013 pedantic.pm
-r--r--r--. 1 root root 2597 Jun 24 2013 rush.pm
/usr/local/lib64/perl5/DBD/Gofer/Transport:
total 44
-r--r--r--. 1 root root 12755 Jun 24 2013 Base.pm
-r--r--r--. 1 root root 3356 Apr 4 2013 corostream.pm
-r--r--r--. 1 root root 2770 Jun 24 2013 null.pm
-r--r--r--. 1 root root 7299 Jun 24 2013 pipeone.pm
-r--r--r--. 1 root root 9248 Jun 24 2013 stream.pm
Thank you.
Re: check_oracle_health Can't locate DBD/Oracle/Object.pm
I saw that the oracle instalt client 12.1 was installed in this machine, although that provides the symlinks through 11.1. Anyway, following your documents above, I went ahead and remove all 3 oracle instant clients and reinstalled the latest verison of 11.2. And then downloaded the http://assets.nagios.com/downloads/gene ... install.sh and ran it. It did bunch of stuffs, and finally completed with following last two lines:
...
ORACLE_HOME=/usr/lib/oracle/11.2/client64
LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
But even after than executing the check_oracle_health command displayed the same error as originally posted here:
install_driver(Oracle) failed: Can't locate DBD/Oracle/Object.pm in @INC
One thing I am wondering is why there is no /usr/lib64/perl5/DBD/Oracle/Object.pm or /usr/local/lib64/perl5/DBD/Oracle/Object.pm file ! In fact no DBD/Oracle directory.
Thanks.
...
ORACLE_HOME=/usr/lib/oracle/11.2/client64
LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
But even after than executing the check_oracle_health command displayed the same error as originally posted here:
install_driver(Oracle) failed: Can't locate DBD/Oracle/Object.pm in @INC
One thing I am wondering is why there is no /usr/lib64/perl5/DBD/Oracle/Object.pm or /usr/local/lib64/perl5/DBD/Oracle/Object.pm file ! In fact no DBD/Oracle directory.
Thanks.
Re: check_oracle_health Can't locate DBD/Oracle/Object.pm
Most probably this is due to the Perl module not being installed properly. The issue is described in our documentation:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
To remedy this problem, execute the following from the command line:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
To remedy this problem, execute the following from the command line:
Code: Select all
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
cpan -i DBD::OracleBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_oracle_health Can't locate DBD/Oracle/Object.pm
Following straight through that docs did not work but certainly pointed me to the right direction.
I am not sure how the Oracle.pm file was brought there in /usr/local/lib64/perl5/DBD/... I can see that Oracle:DBD alyeady installed when I used the cpan to install the module. But as you said, Oracle:DBD might not have installed correctly. So I had to rename that file Oracle.pm to something else and then removed the oracle instant clients. Then installed the oracle instant client again, and then installed the Oracle::DBD from cpan. That resolved the issue. I can now see that DBD/Oracle/Object.pm file. So it seems true that Oracle:DBD might not have installed properly before, or previous admin might just have copied the Oracle.pm file instead of properly installing the module.
The issue is now resolved. Thanks.
I would appreciate if you can tell me how do I post it to the nagioxxi in Customer Support if I have any future issues or questions. We are the customer of Nagios and we have the "Nagios XI Unlimited Node Renewal -1 Year Email and Support and Maintenance" and also "Nagios XI Enterprise License Add-on Renewal, 1 Years Maintenance". I have the account number too. Just not sure how do I get access there.
Thanks.
I am not sure how the Oracle.pm file was brought there in /usr/local/lib64/perl5/DBD/... I can see that Oracle:DBD alyeady installed when I used the cpan to install the module. But as you said, Oracle:DBD might not have installed correctly. So I had to rename that file Oracle.pm to something else and then removed the oracle instant clients. Then installed the oracle instant client again, and then installed the Oracle::DBD from cpan. That resolved the issue. I can now see that DBD/Oracle/Object.pm file. So it seems true that Oracle:DBD might not have installed properly before, or previous admin might just have copied the Oracle.pm file instead of properly installing the module.
The issue is now resolved. Thanks.
I would appreciate if you can tell me how do I post it to the nagioxxi in Customer Support if I have any future issues or questions. We are the customer of Nagios and we have the "Nagios XI Unlimited Node Renewal -1 Year Email and Support and Maintenance" and also "Nagios XI Enterprise License Add-on Renewal, 1 Years Maintenance". I have the account number too. Just not sure how do I get access there.
Thanks.
Re: check_oracle_health Can't locate DBD/Oracle/Object.pm
I am glad I could help!The issue is now resolved. Thanks.
Please contact our sales team at [email protected]. They will be able to grant you access to the Customer only support forum. Thanks!I would appreciate if you can tell me how do I post it to the nagioxxi in Customer Support if I have any future issues or questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!