Error while monitoring a Oracle Database
Re: Error while monitoring a Oracle Database
Can someone please respond as this is on priority
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error while monitoring a Oracle Database
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
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
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
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.
/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.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Error while monitoring a Oracle Database
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
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
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?
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
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:
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.
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))
)
)
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Error while monitoring a Oracle Database
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
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
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?
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?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error while monitoring a Oracle Database
As stated before, when running from the command line you need to include 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/client64it 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