Page 1 of 1

Install Oracle Client & Plugin - Offline

Posted: Mon Apr 06, 2020 9:47 am
by pavankumar
Hi Team,

We are trying to configure & install Oracle Client & Plugins. Our Linux systems are not connected to internet and need to do an offline installation.
RHEL 7 x86_64 is the one we are looking at.

Please let us know all the dependencies and procedure to install it offline.

Thanks.

Re: Install Oracle Client & Plugin - Offline

Posted: Mon Apr 06, 2020 4:21 pm
by cdienger
I haven't been able to fully test this yet, but it appears to download and install everything:

1. Download:

https://labs.consol.de/assets/downloads ... 2.2.tar.gz

https://cpan.metacpan.org/authors/id/T/ ... 643.tar.gz
http://search.cpan.org/CPAN/authors/id/ ... .74.tar.gz

yum reinstall --downloadonly --downloaddir=. glibc-static
yum reinstall --downloadonly --downloaddir=. glibc-utils
yum reinstall --downloadonly --downloaddir=. perl-YAML
yum reinstall --downloadonly --downloaddir=. gd
yum reinstall --downloadonly --downloaddir=. libXpm

The attached oracleinstall.sh

Copy them to the /tmp directory of the XI server

2. Run the install:

Code: Select all

cd /tmp
chmod 755 oracleinstall.sh
./oracleinstall.sh

Re: Install Oracle Client & Plugin - Offline

Posted: Tue Apr 07, 2020 8:09 am
by pavankumar
Thanks for the reply.

I am getting the below error.

CRITICAL - cannot connect to <hostname>:1521/nagios. 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/sha

I have tried DBD:Oracle following below instructions but of no use.
tar zxvf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
perl Makefile.PL -l
make && make test
make install
----------------------------------------------------------------
I would prefer to set up a call to resolve this.
Thanks

Re: Install Oracle Client & Plugin - Offline

Posted: Tue Apr 07, 2020 11:48 am
by cdienger
Sounds good. Our contact information can be found at www.nagios.com/contact. Please have your customer ID or the last 6 characters of your XI license available when you call so we can confirm phone support.

Re: Install Oracle Client & Plugin - Offline

Posted: Tue Apr 07, 2020 12:45 pm
by tgriep
Have the customer download the following files and put then in a folder on the XI server.

Code: Select all

check_oracle_health-3.1.2.2.tar.gz
DBD-Oracle-1.74.tar.gz
DBI-1.642.tar.gz
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
The Oracle Instant Client can be downloaded from Oracle, the other files from the following URL's.

https://labs.consol.de/assets/downloads ... 2.2.tar.gz
http://search.cpan.org/CPAN/authors/id/ ... .74.tar.gz
https://www.cpan.org/modules/by-module/ ... 642.tar.gz

Put the modified script in the same folder and run it.
./oracleinstall.sh

Re: Install Oracle Client & Plugin - Offline

Posted: Wed Apr 08, 2020 5:27 am
by pavankumar
I have installed those and there were no errors.

when i try to configure a monitor i am getting the same error again. I have tested the connection using SQL Developer to ensure that connection params are valid.

[nagios@****.vmpc1.cloud.****.com ~]$ . /usr/local/nagiosxi/etc/configwizards/oracle/oracle && /usr/local/nagios/libexec/check_oracle_health --connect '<hostname>:53625/nagios.****db' --username 'system' --password '****' --mode sql --name="select count(*) from ALL_TABLES" --warning 50 --critical 200
CRITICAL - cannot connect to <hostname>:53625/nagios.****. 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, Pg, Proxy, SQLite, Sponge, mysql.
at /usr/local/nagios/libexec/check_oracle_health line 6151.

Thanks

Re: Install Oracle Client & Plugin - Offline

Posted: Wed Apr 08, 2020 9:02 am
by tgriep
Take a look in this file on the Nagios server.

Code: Select all

/usr/local/nagiosxi/etc/configwizards/oracle/oracle
It is used to setup the environment variables that the plugin uses.
It is setup to use version 11.2 of the Oracle Instant Client.
If you installed a different version, you will need to update the paths in that file and then test the command again.

Re: Install Oracle Client & Plugin - Offline

Posted: Wed Apr 08, 2020 9:21 am
by pavankumar
I have modified those already and the related command in core config manager.

[admin@****10018 ~]$ more /usr/local/nagiosxi/etc/configwizards/oracle/oracle
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64
export ORACLE_HOME=/usr/lib/oracle/12.1/client64/lib
[admin@sbl70010018 ~]$

Thanks

Re: Install Oracle Client & Plugin - Offline

Posted: Wed Apr 08, 2020 2:31 pm
by tgriep
In the folder you downloaded the files and ran the script.
Go to this sub folder called

Code: Select all

DBD-Oracle-1.74
Run the following to install the DBD Oracle Perl module.

Code: Select all

export ORACLE_HOME="/usr/lib/oracle/12.1/client64/lib"
export LD_LIBRARY_PATH="$ORACLE_HOME/lib"
perl Makefile.PL -l 
make && make test 
make install
Test the check_oracle_health plugin again.
If it cannot find the DBD/oracle.pm module, show the full output for when it was reinstalled so we can check it for errors.