I see, so maybe there's no way to throw oracle queries to nagios?dwasswa wrote:Hi @ clinton92,
I tested the plugin and got the same error.
Therefore,its a problem with the plugin.
Have you tried that anyway? any suggestions?
I see, so maybe there's no way to throw oracle queries to nagios?dwasswa wrote:Hi @ clinton92,
I tested the plugin and got the same error.
Therefore,its a problem with the plugin.
Code: Select all
cd /tmp
wget http://assets.nagios.com/downloads/general/scripts/oracleinstall.sh
Code: Select all
uname -i
Code: Select all
i?86
Code: Select all
x86_64
Code: Select all
i?86
Code: Select all
uname -i
Code: Select all
chmod +x oracleinstall.sh
./oracleinstall.sh
Code: Select all
ORACLE_HOME=/usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
dwasswa wrote:Hi @ clinton92,
I tested the plugin and got the same error.
Therefore,its a problem with the plugin.
Code: Select all
Instant Client Basic version 12.2
Instant Client SQLPlus 12.2
Instant Client SDK or Devel 12.2
Code: Select all
ORACLE_HOME=/usr/lib/oracle/12.2/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib
Code: Select all
cpan -i DBD::Oracle
Code: Select all
cd /tmp
wget http://www.cpan.org/modules/by-module/DBD/DBD-Oracle-1.74.tar.gz
tar zxvf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
perl Makefile.PL -l
make && make test
make install
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client/lib ORACLE_HOME=/usr/lib/oracle/12.2/client $USER1$/check_oracle_health $ARG1$
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client/lib ORACLE_HOME=/usr/lib/oracle/12.2/client $USER1$/check_oracle_health --connect=xxx.xxx.xxx.xxx:yyyy/zz --username=oracleusername --password=oraclepassword --mode=connection-time
Code: Select all
Installation of ZIP files:
1. Download the desired Instant Client ZIP files. All installations require the Basic or Basic Light package.
2. Unzip the packages into a single directory such as /opt/oracle/instantclient_12_2 that is accessible to your application. For example:
cd /opt/oracle
unzip instantclient-basic-linux.x64-12.2.0.1.0.zip
3. Create the appropriate libclntsh.so and libocci.so links for the version of Instant Client. For example:
cd /opt/oracle/instantclient_12_2
ln -s libclntsh.so.12.1 libclntsh.so
ln -s libocci.so.12.1 libocci.so
4. Install the libaio package, for example on Oracle Linux, run this as the root user:
yum install libaio
On some Linux distributions the package is called libaio1.
5. Set the environment variable LD_LIBRARY_PATH to the directory created in Step 2, for example:
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
Alternatively, add this path to an ldconfig configuration file if there is no other Oracle software that will be impacted.
6. To use supplied binaries such as SQL*Plus, update your PATH environment variable, for example:
export PATH=/opt/oracle/instantclient_12_2:$PATH
7. Start your application.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH ORACLE_HOME=/opt/oracle/instantclient_12_2:$PATH /usr/local/nagios/libexec/check_oracle_health --connect=10.130.8.40:5666/WFMPPDB --username=sys --password=ThuC23aD --mode=connection-time
/usr/local/nagios/libexec/check_oracle_health: line 4: syntax error near unexpected token `newline'
/usr/local/nagios/libexec/check_oracle_health: line 4: `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'