Using the info in that link I managed to get it installed, am now getting
ORA-12545: Connect failed because target host or object does not exist (DBD ERROR: OCIServerAttach)
Am having a look now, appears to be a listner/connection issue
Unable to install DBD::Oracle
Re: Unable to install DBD::Oracle
Have had no luck resolving this, any posts I have seen refer to having a tnsnames.ora which I do not have but have followed all the install steps in the XI guide?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unable to install DBD::Oracle
What is the exact command you are using? The TNS listener is located on the oracle server, you will need to get with your oracle DBA and make sure they set you up with a listener service that has permissions to see everything you intend to monitor with the wizards.
Re: Unable to install DBD::Oracle
Any of the Core ones imported via the Wizard for Oracle checks:
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$
--connect '<ip>:1521/BGRSPRD' --username 'sys' --password '****' --mode connection-time --warning 1 --critical 5
Is there some config required on the listener to allow us to connect?
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$
--connect '<ip>:1521/BGRSPRD' --username 'sys' --password '****' --mode connection-time --warning 1 --critical 5
Is there some config required on the listener to allow us to connect?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unable to install DBD::Oracle
Well it is absolutely imperative that you have a TNS listener listening for your connection, you can run the following on the oracle server to see what listeners are available but anything beyond what has already been covered i.e. "anything on your oracle server" is beyond the scope of Nagios support:
Can you run your entire check command manually from the CLI and show the output?
Code: Select all
lsnrctl statusRe: Unable to install DBD::Oracle
Apologies, I have been of sick for a few weeks and just getting back to this, will run the check from the command line as requested.
Re: Unable to install DBD::Oracle
./check_oracle_health --connect <host>:1521/KANADB' --username 'sys' --password '****' --mode tablespace-usage --warning 90 --critical 98
CRITICAL - cannot connect to <host>:1521/KANADB. ORA-12545: Connect failed because target host or object does not exist (DBD ERROR: OCIServerAttach)
[NagiosX1:main.linux64 libexec]#
lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 29-MAY-2014 05:26:28
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 27-APR-2014 22:57:30
Uptime 31 days 6 hr. 28 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/kcibdb02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kcibdb02)(PORT=1521)))
Services Summary...
Service "KANADB" has 1 instance(s).
Instance "KANADB", status READY, has 1 handler(s) for this service...
The command completed successfully
CRITICAL - cannot connect to <host>:1521/KANADB. ORA-12545: Connect failed because target host or object does not exist (DBD ERROR: OCIServerAttach)
[NagiosX1:main.linux64 libexec]#
lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 29-MAY-2014 05:26:28
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 27-APR-2014 22:57:30
Uptime 31 days 6 hr. 28 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/kcibdb02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kcibdb02)(PORT=1521)))
Services Summary...
Service "KANADB" has 1 instance(s).
Instance "KANADB", status READY, has 1 handler(s) for this service...
The command completed successfully
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unable to install DBD::Oracle
You didn't run the status command on the nagios server did you? If you did, looks like you have some strange hybrid oracle going on there. It needs to be ran on the oracle server, if you did run it there, great! As far as that TNS listener service, did your DBA tell you whether it had permissions on what you are trying to check, and that it is actually listening? It's likely your XI server's ADDRESS is not defined for it.NagiosX1:main.linux64 libexec