Page 1 of 3
Error when running Oracle Query
Posted: Tue Oct 22, 2019 9:05 am
by Frédéric GRANAT
Hi,
I created a query, by using the "Oracle query" configuration wizard.
When I try to "run check command" on the service, I've got :
Code: Select all
[[email protected] ~]$ source /usr/local/nagiosxi/etc/configwizards/oracle/oracle && /usr/local/nagios/libexec/check_oracle_health --connect 'xxxxxxxx:xxxxxx/xxxxxxx' --username 'system' --password 'xxxxxxx' --mode sql --name="select file_name as name,bytes/1024/1024 size_mo from dba_data_files where file_name like '%UNDO%'" --warning 1000 --critical 2000
CRITICAL - cannot connect to xxxxxxxx:xxxxxx/xxxxxxx. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 19) line 3
Compilation failed in require at (eval 19) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_oracle_health line 6151
Could you please help me ?
Re: Error when running Oracle Query
Posted: Tue Oct 22, 2019 9:56 am
by benjaminsmith
Hello Frederic,
Did you just setup monitoring with the Oracle Wizard? It looks like there is a path error. Make sure you have the environment variables set correctly.
x86: /usr/lib/oracle/<YOUR ORACLE VERSION>/client
x86_64: /usr/lib64/oracle/<YOUR ORACLE VERSION>/client
What is the output of this command?
Code: Select all
cat /usr/local/nagiosxi/etc/configwizards/oracle/oracle
Documentation
How To Install & Configure The Oracle Client & Plugins
Re: Error when running Oracle Query
Posted: Tue Oct 22, 2019 10:25 am
by Frédéric GRANAT
Hi,
Here it is :
[root@nagiosxi ~]# cat /usr/local/nagiosxi/etc/configwizards/oracle/oracle
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib
export ORACLE_HOME=/usr/lib/oracle/11.2/client
[root@nagiosxi ~]#
Do you think I have to install Oracle as described in the link you gave me ?
Re: Error when running Oracle Query
Posted: Tue Oct 22, 2019 11:02 am
by benjaminsmith
Hello,
Can you post the output of the following command to check the paths. Thanks.
Code: Select all
locate libclntsh.so.12.1
#OR
find / -name libclntsh.so.12.1
Re: Error when running Oracle Query
Posted: Fri Oct 25, 2019 8:34 am
by Frédéric GRANAT
Hi,
Here it is :
[root@nagiosxi /]# find / -name libclntsh.so.12.1
/usr/lib/oracle/12.2/client64/lib/libclntsh.so.12.1
Re: Error when running Oracle Query
Posted: Fri Oct 25, 2019 10:08 am
by lmiltchev
I would assume you followed our official documentation for installing the oracle client:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
I see a mismatch in the client version and architecture... In the "/usr/local/nagiosxi/etc/configwizards/oracle/oracle" file, you are using version 11.2 (32-bit), but it seems like, you have 12.2 (64-bit). You may try to reinstall the oracle client or just modify the "/usr/local/nagiosxi/etc/configwizards/oracle/oracle" file if you think the client was installed correctly.
Re: Error when running Oracle Query
Posted: Mon Nov 04, 2019 9:21 am
by Frédéric GRANAT
Hi,
I don't know if the client was installed correctly.
If it has been installed it was during the NagiosXI install : does the NagiosXI install package includes an Oracle client install ?
Re: Error when running Oracle Query
Posted: Mon Nov 04, 2019 9:45 am
by lmiltchev
If it has been installed it was during the NagiosXI install : does the NagiosXI install package includes an Oracle client install ?
No, we do not include Oracle client plugins with Nagios XI for legal reasons. They must have been installed by you or someone on your team on your system. See page 2 of our document:
Due to legal reasons, Nagios cannot provide direct download links to these RPMs so you will have to go to Oracle's website and download them.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
I would recommend that you remove the old version of Oracle clients completely, install the new one (using the correct package as far as architecture goes, e.g. 64-bit vs 32-bit), and modify the "/usr/local/nagiosxi/etc/configwizards/oracle/oracle" file accordingly.
Re: Error when running Oracle Query
Posted: Fri Nov 08, 2019 3:16 am
by Frédéric GRANAT
Hi,
According to the document "Installing and configuring Oracle pluggins"...I followed the steps till page 2 and ran oracleinstall.sh.
According to that same document :
"At the very end, will dump out some variables that you will need to apply to your particular
case. In my case they look like this:
ORACLE_HOME=/usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib"
In my case I didn't see that at the end of the install (I attached the log of the execution)
I think the install failed but I don't know why.
Could you please help me ?
Re: Error when running Oracle Query
Posted: Fri Nov 08, 2019 10:25 am
by lmiltchev
Did you remove the old version of Oracle clients completely before trying to perform the new install?
I see this in the log:
Examining oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm: oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64
oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm: does not update installed package.
Examining oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm: oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64
oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm: does not update installed package.
Examining oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm: oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64
oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm: does not update installed package.
Nothing to do
which leads me to believe that your "old" oracle packages were not removed prior to running the script.