Page 3 of 5
Re: Error while monitoring a Oracle Database
Posted: Wed Oct 31, 2012 4:01 am
by HAL
Can someone please respond as this is on priority
Re: Error while monitoring a Oracle Database
Posted: Wed Oct 31, 2012 4:33 pm
by scottwilkerson
Our Oracle developer is out today but I'll have him take a look as soon as he get in.
Re: Error while monitoring a Oracle Database
Posted: Thu Nov 01, 2012 10:18 am
by HAL
one more observation
when we manually run the command using the perl script Check_Oracle_health we get the following error:
./check_oracle_health --connect "xx.xx.xx.xx:1521" --username dbtestusr --password "dbtestpwd" --name AMOS --mode tablespace-usage --warning 90 --critical 98
CRITICAL - cannot connect to xx.xx.xx.xx:1521. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 18) line 3
Compilation failed in require at (eval 18) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./check_oracle_health line 4755
Re: Error while monitoring a Oracle Database
Posted: Thu Nov 01, 2012 12:39 pm
by nscott
Can you try manually running it like so:
/usr/bin/env LD_LIBRARY_PATH=/usr/lib64/oracle/11.2/client/lib ORACLE_HOME=/usr/lib64/oracle/11.2/client ./check_oracle_health --connect "xx.xx.xx.xx:1521" --username dbtestusr --password "dbtestpwd" --name AMOS --mode tablespace-usage --warning 90 --critical 98
But replace the 11.2 entries in the LD_LIBRARY and ORACLE_HOME vars with the version you're using.
Re: Error while monitoring a Oracle Database
Posted: Mon Nov 05, 2012 7:55 am
by HAL
Hi,
We have checked the version its 11.2. Also we have changed the path as per our installation and executed the command from /usr/local/nagios/libexec.
We did not get any ouput for the same.
Here is the modified command:
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 ./check_oracle_health --connect "xx.xx.xx.xx:1521" --username dbtestusr --password dbtestpwd --name AMOS --mode tablespace-usage --warning 90 --critical 98
Re: Error while monitoring a Oracle Database
Posted: Mon Nov 05, 2012 10:43 am
by HAL
HI
We have tried the telnet to 1521 port also. It is working .
The command you have given is basically the combination of Command and Service with arguments. This is what we configured in Nagios and it is reflecting NULL value. SO obviously it shows blank on command prompt.
We have also observed that in above command if we put dummy password then also it gives nothing. Actually it should give the password incorrect as error message.
What else we are missing?
Re: Error while monitoring a Oracle Database
Posted: Tue Nov 06, 2012 1:31 pm
by nscott
I would talk to your Oracle DBA before applying this as I'm thinking its a problem with your listener.ora, in fact, if you haven't already, I would speak to your DBA about being able to connect to this database if you haven't already. But after doing some reading on the listener.ora and tnsnames.ora, perhaps its worth a shot to try doing this:
Code: Select all
# listener.ora Network Configuration File: D:\oracle\db10g\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\db10g)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = AMOS)
(GLOBAL_DBNAME = AMOS)
(ORACLE_HOME = <ORACLE HOME FOR THIS DB>)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = osldb007.lhc4net.lhc.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = AMOS)(PORT = 1521))
)
)
for your listener.ora, from what I'm gather, the plugin is hitting your oracle database, but it doesn't know how to access it, and it needs to know how to access the AMOS database when asked. Let me know if this changes anything.
Re: Error while monitoring a Oracle Database
Posted: Wed Nov 07, 2012 10:10 am
by HAL
Hi Nicholas,
As advised by you we have asked our dbs to make the entries in oracle dba. Still its not working, its showing as NULL.
Please let us know how can the dba person can get in touch with you? As both of you are in different time zones we have to check the availability.
Please PM your contact details and timings
Re: Error while monitoring a Oracle Database
Posted: Thu Nov 08, 2012 10:21 am
by HAL
Hi,
Now we are getting the error after manually running the command:
[root@oslms018 libexec]# ./check_oracle_health --connect "xx.xx.xx.xx:1521" --username dbtestusr --password dbtestpwd --name AMOSEVAL --mode tablespace-usage --warning 90 --critical 98
CRITICAL - cannot connect to xx.xx.xx.xx:1521. ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (DBDERROR: OCIServerAttach)
Any idea?
Re: Error while monitoring a Oracle Database
Posted: Thu Nov 08, 2012 10:37 am
by scottwilkerson
As stated before, when running from the command line you need to include
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64
before the command or the path will not be set correctly
it should be something like this
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 ./check_oracle_health --connect "xx.xx.xx.xx:1521" --username dbtestusr --password "dbtestpwd" --name AMOSEVAL --mode tablespace-usage --warning 90 --critical 98