Page 2 of 2
Re: oracle monitoring error
Posted: Mon Apr 04, 2016 12:46 pm
by lmiltchev
Can you run the following commands on the Oracle box, and show the output?
Also, post the "tnsnames.ora" file.
Re: oracle monitoring error
Posted: Tue Apr 05, 2016 12:56 pm
by kranthi6
Please find the output below:
testhost:/home/oracle:TALTAM>lsnrctl services
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-APR-2016 12:42:34
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testhost)(PORT=1521)))
Services Summary...
Service "TALTAM.COM" has 1 instance(s).
Instance "TALTAM", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:66399 refused:0 state:ready
LOCAL SERVER
Service "TALTAMXDB.COM" has 1 instance(s).
Instance "TALTAM", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: testhost, pid: 16241>
(ADDRESS=(PROTOCOL=tcp)(HOST=testhost)(PORT=12307))
The command completed successfully
==============================================================================================================================
testhost:/home/oracle:TALTAM>lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-APR-2016 12:42:22
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 25-JAN-2016 16:24:02
Uptime 70 days 19 hr. 18 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/12102/network/admin/listener.ora
Listener Log File /app/oracle/product/diag/tnslsnr/testhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=testhost)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "TALTAM.COM" has 1 instance(s).
Instance "TALTAM", status READY, has 1 handler(s) for this service...
Service "TALTAMXDB.COM" has 1 instance(s).
Instance "TALTAM", status READY, has 1 handler(s) for this service...
The command completed successfully
=======================================================================================================================================
testhost:/app/oracle/product/12102/network/admin:TALTAM>cat tnsnames.ora
# tnsnames.ora Network Configuration File: /app/oracle/product/12102/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
TALTAM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = testhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TALTAM.COM)
)
)
LISTENER_TALTAM =
(ADDRESS = (PROTOCOL = TCP)(HOST = testhost)(PORT = 1521))
Let me know if you need anything
Thanks
Re: oracle monitoring error
Posted: Tue Apr 05, 2016 2:26 pm
by lmiltchev
I don't see "SGRC" anywhere in the "tnsnames.ora"...
Your Oracle Administrator will have to set this up. Here's some basic information:
https://oracle-base.com/articles/misc/o ... figuration
http://www.orafaq.com/wiki/Tnsnames.ora
http://www.orafaq.com/wiki/Listener.ora
Re: oracle monitoring error
Posted: Tue Apr 05, 2016 4:28 pm
by kranthi6
oh sorry, i have provided you another output. Here it is:
xxxxxxxxxxx*SGRC-/home/oracle >lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-APR-2016 12:26:48
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_SGRC
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 31-MAR-2016 10:55:17
Uptime 5 days 1 hr. 31 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/12102/network/admin/listener.ora
Listener Log File /app/oracle/diag/tnslsnr/xxxxxxxxxxx/listener_sgrc/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxxxxxx.xx.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=xxxxxxxxxxx.xx.com)(PORT=5500))(Security=(my_wallet_directory=/app/oracle/admin/SGRC/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "SGRC.xx.com" has 1 instance(s).
Instance "SGRC", status READY, has 1 handler(s) for this service...
Service "SGRCXDB.xx.com" has 1 instance(s).
Instance "SGRC", status READY, has 1 handler(s) for this service...
The command completed successfully
======================================================================================
xxxxxxxxxxx*SGRC-/home/oracle >lsnrctl services
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-APR-2016 12:26:58
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "SGRC.xx.com" has 1 instance(s).
Instance "SGRC", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:7785 refused:0 state:ready
LOCAL SERVER
Service "SGRCXDB.xx.com" has 1 instance(s).
Instance "SGRC", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: xxxxxxxxxxx.xx.com, pid: 19444>
(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxxxxxx.xx.com)(PORT=51375))
The command completed successfully
======================================================================================
xxxxxxxxxxx*SGRC-/app/oracle/product/12102/network/admin >cat tnsnames.ora
# tnsnames.ora Network Configuration File: /app/oracle/product/12102/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
SGRC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxxx.xx.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SGRC.xx.COM)
)
)
BSMTDT1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = BSMTDT1.xx.com)
)
)
LISTENER_SGRC =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxxx.xxx.com)(PORT = 1521))
LAWTEMP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1531))
)
(CONNECT_DATA =
(SERVICE_NAME = LAWTEMP)
)
)
LAWDEVG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1532))
)
(CONNECT_DATA =
(SERVICE_NAME = LAWDEVG)
)
)
RMANREP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxphloem01.corp.pri)(PORT = 1532))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rmanrep)
)
)
PALTAM3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxdallnx1113.xxx.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PALTAM3.xxx.COM)
)
)
PALTAM2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PALTAM2.xxx.COM)
)
)
PBIREPO =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxeaglnx120)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pbirepo)
)
)
PPLMDM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxeaglnx120)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = pplmdm)
)
)
PGRC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PGRC.xxx.com)
)
)
Re: oracle monitoring error
Posted: Tue Apr 05, 2016 4:45 pm
by rkennedy
(SERVICE_NAME = SGRC.xx.COM)
I believe it's not SGRC you're looking for, but rather SGRC.xx.com. Can you adjust it accordingly and post the result?
Also, what is the result of
nmap ipoforaclemachine from the XI machine? (replace ipoforaclemachine accordingly)
Re: oracle monitoring error
Posted: Tue Apr 05, 2016 9:25 pm
by kranthi6
Well, there is an improvement now after adding the .com to the instance name. This is the error:
CRITICAL - cannot connect to xx.xx.xx.xx:1521/SGRC.XX.COM. ORA-01017: invalid username/password: logon denied (DBD ERROR: OCISessionBegin)
But I am not sure if this is username and password issue as our DBA has provided the credentials. I will recheck with them tomorrow. Is there any manual/guide for creating a service account for Nagios checks?
Please find the nmap output:
Starting Nmap 6.47 (
http://nmap.org ) at 2016-04-05 21:22 CDT
Nmap scan report for xxxxxxx.xx.com (xx.xx.xx.xx) ----- I have verified the hostname and IP are correct for this oracle DB
Host is up (0.068s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
32/tcp open unknown
1521/tcp open oracle
5500/tcp open hotline
13782/tcp open netbackup
Nmap done: 1 IP address (1 host up) scanned in 1.20 seconds
Thanks
Re: oracle monitoring error
Posted: Wed Apr 06, 2016 1:10 pm
by rkennedy
We do not have a guide available, you'll need to consult the oracle admin to do so.
At this point the command is right, so please check the credentials with whomever set them up and we can go from there.
Re: oracle monitoring error
Posted: Wed Apr 27, 2016 7:41 am
by ghostzy
Hi Guys, i've read the thread, an unfortunately i'm in the same place as kranthi6, i'm getting :
Code: Select all
CRITICAL - cannot connect to IP:1521/ORCL. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
I've read the instructions from lmiltchev , and i belive my oracle server it's now set properly on tnsnames.ora:
lsnrctl services
Code: Select all
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 27-APR-2016 16:32:45
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "ALEX9" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:4378 refused:0 state:ready
LOCAL SERVER
Service "ORCLXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: SERVERNAME.com, pid: 2045>
(ADDRESS=(PROTOCOL=tcp)(HOST=SERVERNAME.com)(PORT=52488))
The command completed successfully
lsnrctl status
Code: Select all
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 27-APR-2016 16:33:48
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 14-APR-2016 16:38:59
Uptime 12 days 23 hr. 54 min. 50 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /local/ora/oracle/diag/tnslsnr/qr-ora-test01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SERVERNAME.com)(PORT=1521)))
Services Summary...
Service "ALEX9" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
tnsnames.ora content from the oracle server
Code: Select all
<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
# one or more descriptions
# If there is just one description, unnecessary ]
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= # Optional depending on whether u have
# one or more addresses
# If there is just one address, unnecessary ]
(ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
[ (ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=decnet)
(NODE=<nodename>)
(OBJECT=<objectname>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST is used or not
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= ] # Optional depending on whether u have more
# than one address or not
# If there is just one address, unnecessary
(ADDRESS
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST
# is being used
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
... # More descriptions
[ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
So when i'm running my check:
Code: Select all
[root@nagiosxi libexec]# /usr/local/nagios/libexec/check_oracle_health --connect 'SERVERIP:1521/ORCL' --username 'USER' --password 'PASSWORD' --mode tablespace-can-allocate-next --warning 20 --critical 30
CRITICAL - cannot connect to SERVERIP:1521/ORCL. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
Can you please point me to what wrong here ? Any help is more than welcome.
many thanks
Cristi
Re: oracle monitoring error
Posted: Wed Apr 27, 2016 10:04 am
by tmcdonald
I see you have posted this exact response in another thread here:
https://support.nagios.com/forum/viewto ... 42#p181042
I will be closing this thread and we can continue there. In the future please do not double-post, as it causes extra unnecessary work on our end. I will also ask that in the future you create a new post to reference an existing one instead of adding on, as this causes threads to get quite long and complex when we potentially need to keep track of multiple people in one thread.