Check_oracle_health problem
-
- Posts: 41
- Joined: Wed Nov 15, 2017 4:57 am
Check_oracle_health problem
Hi support,
when i copy the check_oracle_health to the server, and grant permission for nagios user to the databases. but when i running the check_oracle_health, it show :
==========================================================================================================
[nagios@Nagios.Huawei ~]$ /usr/local/nagios/libexec/check_nrpe -H xxxxxxxxx -t 30 -c check_oracle_health -a xxxx tablespace-usage "--tablespace xxxxx"
CRITICAL - cannot connect to xxxx. 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, SQLite, Sponge.
at /usr/local/nagios/libexec/check_oracle_health line 6093.
==========================================================================================================
i check on the perl -v, it is installed.
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 33 registered patches, see perl -V for more detail)
what i miss configure??
when i copy the check_oracle_health to the server, and grant permission for nagios user to the databases. but when i running the check_oracle_health, it show :
==========================================================================================================
[nagios@Nagios.Huawei ~]$ /usr/local/nagios/libexec/check_nrpe -H xxxxxxxxx -t 30 -c check_oracle_health -a xxxx tablespace-usage "--tablespace xxxxx"
CRITICAL - cannot connect to xxxx. 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, SQLite, Sponge.
at /usr/local/nagios/libexec/check_oracle_health line 6093.
==========================================================================================================
i check on the perl -v, it is installed.
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 33 registered patches, see perl -V for more detail)
what i miss configure??
Regards,
JQ
JQ
Re: Check_oracle_health problem
That's great that Perl is indeed installed, but it looks like you're actually missing the DBD::Oracle module as per this message:
There's official documentation regarding leveraging this plugin with Nagios XI:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Please follow that documentation step-by-step and share any errors you receive after doing so. My best guess is the Oracle Client isn't properly registered in your systems environment or was never installed to begin with.
Code: Select all
Can't locate DBD/Oracle.pm in @INC
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Please follow that documentation step-by-step and share any errors you receive after doing so. My best guess is the Oracle Client isn't properly registered in your systems environment or was never installed to begin with.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Check_oracle_health problem
Thanks for the help @mcapra!
junqian1992, Please read through the documentation and let us know if you have any more questions.
junqian1992, Please read through the documentation and let us know if you have any more questions.
-
- Posts: 41
- Joined: Wed Nov 15, 2017 4:57 am
Re: Check_oracle_health problem
Hi,
My Nagios XI have other server is running normal on the check_oracle_health.now only this server have this problem.
I'm unable to install the DBD-Oracle. any other plugin before install the DBD-oracle?
===============================
tar zxvf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
perl Makefile.PL -l
make && make test
make install
===============================
My Nagios XI have other server is running normal on the check_oracle_health.now only this server have this problem.
I'm unable to install the DBD-Oracle. any other plugin before install the DBD-oracle?
===============================
tar zxvf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
perl Makefile.PL -l
make && make test
make install
===============================
Regards,
JQ
JQ
Re: Check_oracle_health problem
There are multiple requirements mentioned in the official documentation I shared:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Did you encounter any specific errors following the steps in that documentation? Did you download the required Oracle RPMs and run the oracleinstall.sh script?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Did you encounter any specific errors following the steps in that documentation? Did you download the required Oracle RPMs and run the oracleinstall.sh script?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Check_oracle_health problem
Thanks @mcapra!
junqian1992, please take a look at the documentation again or post any errors you are receiving. Or are they the still the same errors in your original post?
junqian1992, please take a look at the documentation again or post any errors you are receiving. Or are they the still the same errors in your original post?
-
- Posts: 41
- Joined: Wed Nov 15, 2017 4:57 am
Re: Check_oracle_health problem
Hi all,
oracleinstall.sh script --- > I check on My nagios server already existing the check_oracle_health and Nagios xi already configured (check_xi_oraclequery, check_xi_oracleserverspace, check_xi_oracletablespace) and few of the server is running the check_oracle_health without error, so this step i direct skip it. Or this script need to running on the client server? (Remark: all server cannot direct connect to the internet)
when i perform the perl Makefile.PL -l for install the DBD-Oracle it show the error as below:
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /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 Makefile.PL line 10.
BEGIN failed--compilation aborted at Makefile.PL line 10.
oracleinstall.sh script --- > I check on My nagios server already existing the check_oracle_health and Nagios xi already configured (check_xi_oraclequery, check_xi_oracleserverspace, check_xi_oracletablespace) and few of the server is running the check_oracle_health without error, so this step i direct skip it. Or this script need to running on the client server? (Remark: all server cannot direct connect to the internet)
when i perform the perl Makefile.PL -l for install the DBD-Oracle it show the error as below:
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /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 Makefile.PL line 10.
BEGIN failed--compilation aborted at Makefile.PL line 10.
Regards,
JQ
JQ
Re: Check_oracle_health problem
Try install this and then rerun the perl makefile.PL -l
Let us know if it succeeds or not.
Code: Select all
yum -y install perl-devel
-
- Posts: 41
- Joined: Wed Nov 15, 2017 4:57 am
Re: Check_oracle_health problem
Hi,
I already install the perl_devel on the server by using the rpm source.
Below is the perl list on the server :
yum list installed | grep perl
perl.x86_64 4:5.16.3-292.el7 @anaconda/7.4
perl-Carp.noarch 1.26-244.el7 @anaconda/7.4
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 installed
perl-Compress-Zlib.x86_64 2.021-144.el6 installed
perl-DBI.x86_64 1.627-4.el7 installed
perl-Data-Dumper.x86_64 2.145-3.el7 installed
perl-Encode.x86_64 2.51-7.el7 @anaconda/7.4
perl-Exporter.noarch 5.68-3.el7 @anaconda/7.4
perl-ExtUtils-Install.noarch 1.58-292.el7 installed
perl-ExtUtils-MakeMaker.noarch 6.68-3.el7 installed
perl-ExtUtils-Manifest.noarch 1.61-244.el7 installed
perl-ExtUtils-ParseXS.noarch 1:3.18-3.el7 installed
perl-File-Path.noarch 2.09-2.el7 @anaconda/7.4
perl-File-Temp.noarch 0.23.01-3.el7 @anaconda/7.4
perl-Filter.x86_64 1.49-3.el7 @anaconda/7.4
perl-Getopt-Long.noarch 2.40-2.el7 @anaconda/7.4
perl-HTTP-Tiny.noarch 0.033-3.el7 @anaconda/7.4
perl-Net-Daemon.noarch 0.48-5.el7 installed
perl-Newt.x86_64 1.08-36.el7 @anaconda/7.4
perl-PathTools.x86_64 3.40-5.el7 @anaconda/7.4
perl-PlRPC.noarch 0.2020-14.el7 installed
perl-Pod-Escapes.noarch 1:1.04-292.el7 @anaconda/7.4
perl-Pod-Perldoc.noarch 3.20-4.el7 @anaconda/7.4
perl-Pod-Simple.noarch 1:3.28-4.el7 @anaconda/7.4
perl-Pod-Usage.noarch 1.63-3.el7 @anaconda/7.4
perl-Scalar-List-Utils.x86_64 1.27-248.el7 @anaconda/7.4
perl-Socket.x86_64 2.010-4.el7 @anaconda/7.4
perl-Storable.x86_64 2.45-3.el7 @anaconda/7.4
perl-Test-Harness.noarch 3.28-3.el7 installed
perl-Text-ParseWords.noarch 3.29-4.el7 @anaconda/7.4
perl-Time-HiRes.x86_64 4:1.9725-3.el7 @anaconda/7.4
perl-Time-Local.noarch 1.2300-2.el7 @anaconda/7.4
perl-constant.noarch 1.27-2.el7 @anaconda/7.4
perl-devel.x86_64 4:5.16.3-292.el7 installed
perl-libs.x86_64 4:5.16.3-292.el7 @anaconda/7.4
perl-macros.x86_64 4:5.16.3-292.el7 @anaconda/7.4
perl-parent.noarch 1:0.225-244.el7 @anaconda/7.4
perl-podlators.noarch 2.5.1-3.el7 @anaconda/7.4
perl-threads.x86_64 1.87-4.el7 @anaconda/7.4
perl-threads-shared.x86_64 1.43-6.el7 @anaconda/7.4
=======================================================================================
After i installed a series of perl dependencies "perl Makefile.PL -l" can running already and i perform the "make install" on the DBD-oracle-1.74 without showing any error :
[root@xxxxxxxxxxx DBD-Oracle-1.74]# make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/dbdimp.h
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.h
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/mk.pm
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/ocitrace.h
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.bs
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so
Installing /usr/local/lib64/perl5/DBD/Oracle.pm
Installing /usr/local/lib64/perl5/DBD/Oracle/Object.pm
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/GetInfo.pm
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Win32.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Sun.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Linux.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Aix.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Hpux.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Win64.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Cygwin.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Vms.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Macos.pod
Installing /usr/local/share/man/man3/DBD::Oracle::GetInfo.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Vms.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Linux.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Aix.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Macos.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Sun.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Hpux.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Object.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Cygwin.3pm
Installing /usr/local/share/man/man3/DBD::Oracle.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Win64.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Win32.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
Nagios XI result still occur the same error.
I already install the perl_devel on the server by using the rpm source.
Below is the perl list on the server :
yum list installed | grep perl
perl.x86_64 4:5.16.3-292.el7 @anaconda/7.4
perl-Carp.noarch 1.26-244.el7 @anaconda/7.4
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 installed
perl-Compress-Zlib.x86_64 2.021-144.el6 installed
perl-DBI.x86_64 1.627-4.el7 installed
perl-Data-Dumper.x86_64 2.145-3.el7 installed
perl-Encode.x86_64 2.51-7.el7 @anaconda/7.4
perl-Exporter.noarch 5.68-3.el7 @anaconda/7.4
perl-ExtUtils-Install.noarch 1.58-292.el7 installed
perl-ExtUtils-MakeMaker.noarch 6.68-3.el7 installed
perl-ExtUtils-Manifest.noarch 1.61-244.el7 installed
perl-ExtUtils-ParseXS.noarch 1:3.18-3.el7 installed
perl-File-Path.noarch 2.09-2.el7 @anaconda/7.4
perl-File-Temp.noarch 0.23.01-3.el7 @anaconda/7.4
perl-Filter.x86_64 1.49-3.el7 @anaconda/7.4
perl-Getopt-Long.noarch 2.40-2.el7 @anaconda/7.4
perl-HTTP-Tiny.noarch 0.033-3.el7 @anaconda/7.4
perl-Net-Daemon.noarch 0.48-5.el7 installed
perl-Newt.x86_64 1.08-36.el7 @anaconda/7.4
perl-PathTools.x86_64 3.40-5.el7 @anaconda/7.4
perl-PlRPC.noarch 0.2020-14.el7 installed
perl-Pod-Escapes.noarch 1:1.04-292.el7 @anaconda/7.4
perl-Pod-Perldoc.noarch 3.20-4.el7 @anaconda/7.4
perl-Pod-Simple.noarch 1:3.28-4.el7 @anaconda/7.4
perl-Pod-Usage.noarch 1.63-3.el7 @anaconda/7.4
perl-Scalar-List-Utils.x86_64 1.27-248.el7 @anaconda/7.4
perl-Socket.x86_64 2.010-4.el7 @anaconda/7.4
perl-Storable.x86_64 2.45-3.el7 @anaconda/7.4
perl-Test-Harness.noarch 3.28-3.el7 installed
perl-Text-ParseWords.noarch 3.29-4.el7 @anaconda/7.4
perl-Time-HiRes.x86_64 4:1.9725-3.el7 @anaconda/7.4
perl-Time-Local.noarch 1.2300-2.el7 @anaconda/7.4
perl-constant.noarch 1.27-2.el7 @anaconda/7.4
perl-devel.x86_64 4:5.16.3-292.el7 installed
perl-libs.x86_64 4:5.16.3-292.el7 @anaconda/7.4
perl-macros.x86_64 4:5.16.3-292.el7 @anaconda/7.4
perl-parent.noarch 1:0.225-244.el7 @anaconda/7.4
perl-podlators.noarch 2.5.1-3.el7 @anaconda/7.4
perl-threads.x86_64 1.87-4.el7 @anaconda/7.4
perl-threads-shared.x86_64 1.43-6.el7 @anaconda/7.4
=======================================================================================
After i installed a series of perl dependencies "perl Makefile.PL -l" can running already and i perform the "make install" on the DBD-oracle-1.74 without showing any error :
[root@xxxxxxxxxxx DBD-Oracle-1.74]# make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/dbdimp.h
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.h
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/mk.pm
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/ocitrace.h
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.bs
Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so
Installing /usr/local/lib64/perl5/DBD/Oracle.pm
Installing /usr/local/lib64/perl5/DBD/Oracle/Object.pm
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/GetInfo.pm
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Win32.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Sun.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Linux.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Aix.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Hpux.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Win64.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Cygwin.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Vms.pod
Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Macos.pod
Installing /usr/local/share/man/man3/DBD::Oracle::GetInfo.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Vms.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Linux.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Aix.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Macos.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Sun.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Hpux.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Object.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Cygwin.3pm
Installing /usr/local/share/man/man3/DBD::Oracle.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Win64.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Win32.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
Nagios XI result still occur the same error.
Regards,
JQ
JQ
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check_oracle_health problem
So when you run the command from the CLI you are still getting the following?junqian1992 wrote:Nagios XI result still occur the same error.
Code: Select all
[nagios@Nagios.Huawei ~]$ /usr/local/nagios/libexec/check_nrpe -H xxxxxxxxx -t 30 -c check_oracle_health -a xxxx tablespace-usage "--tablespace xxxxx"
CRITICAL - cannot connect to xxxx. 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.