Page 1 of 1

Oracle check

Posted: Mon Mar 25, 2013 4:57 pm
by healthfusion
Hello,

Trying to configure monitoring for Oracle box. Was able successively install all RPM according to this doc: http://assets.nagios.com/downloads/nagi ... lation.pdf
Initial error was: CRITICAL - cannot connect to x.x.x.x:1521. ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (DBD ERROR: OCIServerAttach)
After I modified line to: x.x.x.x:1521/Service_name
Getting new error:

COMMAND: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "x.x.x.x:1521/name" --username user --password "pass" --mode sga-data-buffer-hit-ratio --warning 98: --critical 95:
OUTPUT: CRITICAL - cannot connect to x.x.x.x:1521/name. ORA-21561: OID generation failed (DBD ERROR: OCISessionBegin)

Some people had same issue because of wrong client version 64/32 bit. In my case it's CentOS i386 and client i386 as well.

Please help.

Thanks

Re: Oracle check

Posted: Mon Mar 25, 2013 5:00 pm
by scottwilkerson
Did your DBA setup the tnsnames.ora and listener.ora on the Oracle server?

Here is some basic information, but your Oracle Administrator will have to set this up.

http://www.oracle-base.com/articles/mis ... ration.php

http://www.orafaq.com/wiki/Tnsnames.ora

http://www.orafaq.com/wiki/Listener.ora

Re: Oracle check

Posted: Wed Mar 27, 2013 4:21 pm
by healthfusion
Oracle has listener and tnsnames
After I configured tnsname.ora file on Nagios Server I am getting now: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)

Thanks

Re: Oracle check

Posted: Wed Mar 27, 2013 4:41 pm
by scottwilkerson
did you configure the listener as well?

Re: Oracle check

Posted: Wed Mar 27, 2013 6:11 pm
by healthfusion
Yes it's configured on the Oracle server itself. I dont it on Nagios right?

Re: Oracle check

Posted: Thu Mar 28, 2013 12:10 pm
by lmiltchev
After you configured the listener, did you try running the same command?

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "x.x.x.x:1521/name" --username user --password "pass" --mode sga-data-buffer-hit-ratio --warning 98: --critical 95:
Are you still getting the same output?