spi_oracle_listen_twp.pdf

March 27, 2018 | Author: Krishna Parvathaneni | Category: Oracle Database, Databases, Operating System, Server (Computing), Domain Name System


Comments



Description

HP OpenViewSmart Plug-In for Oracle How to monitor your Oracle Listeners By Debbie Salierno & Amy Feldman Introduction The DBSPI provides two mechanisms to monitor an Oracle Listener on a managed node. The Basic Listener Check looks for the existence of a Listener process (tnslsnr) and for the absence of TNS errors when running the Listener Control Utility. The Basic Listener Check is only available on Unix. The Advanced Listener Check performs loopback connection tests through a Listener to a local database instance. Multiple listeners connecting to multiple database instances can be tested. The Advanced Listener is available on both Unix and NT. Basic Listener Check The basic listener check runs a Unix shell script every 5 minutes. The script dbspi_lsnr performs a process status check on the process named tnslsnr. It also runs the Listener Control program lsnrctl to see if there are any Oracle TNS errors. The tnslsnr process does not have to be owned by oracle. Error messages are sent to the management server browser if there are not any tnslsnr processes running, or if any TNS errors are reported by the Oracle Listener Control Utility, lsnrctl. Template details: Monitor template: DBSPI-Ora-Listener Copyright November 20001 1 ” If the DBSPI has not yet been configured on the node. It does not require any configuration. it is not that useful) If at least one tnslsnr process is found. a critical message is sent to the management server browser: “DBSPI10-27: Oracle Listener process is not running. a warning message is sent to the management server browser: “DBSPI10-28: Unable to check Oracle Listener. just deploy the DBSPI-Ora-Listener template on any system running a listener. it is assumed that everything is okay. Possible results: If the listener is running properly on this node. Specific listener processes cannot be checked (so if you are using multiple Listeners on one node. If any TNS errors are found. it is assumed that there is a problem.Interval: 5 minutes Monitor Program: dbspi_lsnr DBSPI-Ora-Listener Prerequisites: You must have configured the DBSPI on the node. If DBSPI collection has been turned off on this node. the basic listener check program exits with this message: “DB-SPI Collection/Analysis has been turned OFF” If there are no tnslsnr processes running on the node. Features: The basic Listener Check was designed to be a quick and effective way to check on the health of oracle listener. and an error is reported. no results are reported. DBSPI is not configured” Copyright November 20001 2 . Limitations: The basic Listener Check is only for use on Unix systems. After you have completed DBSPI configuration. Advanced Listener Check Using the “-n” Option When using the “-n” option.If running Oracle’s Listener Control Utility lsnrctl produces any TNS errors. These two approaches are discussed below. The only requirement is that the database instance name specified in the DBSPI Configuration file be used as a service name in the tnsnames..ora).ora file. Oracle allows several mechanisms to be used when resolving an oracle service name to a network address during a connection attempt. using DNS or NIS in a TCP/IP environment). Specifically. The template that ships with the DBSPI uses the collector/analyzer option “-n” to indicate that a listener connection check is to be performed. then a critical message is sent to the management server browser: “DBSPI10-29: One or more Oracle network services are not configured” Advanced Listener Check The advanced listener check runs the DBSPI collector/analyzer executable every 5 minutes. All listeners that are configured on the node will be checked.g. and Oracle Names Server (an Oracle server that provides a directory service). local naming (tnsnames. the DBSPI Configuration requires the following Oracle information: ORACLE HOME “<ORACLE_HOME>” DATABASE <name> CONNECT “<user/password>” Copyright November 20001 3 . template customization is not necessary. An error message is sent to the management server browser if the listener cannot connect to the instance specified in the DBSPI configuration file. which can be overcome by customizing templates and not using the “-n” option.ora file to the DBSPI Configuration file is met. This paper assumes that a local tnsnames. if the prerequisite mapping of a service name in the tnsnames. Using this template requires minimal configuration.ora file is being used. There are some limitations when using “-n”. These include host naming (e. 5” DATABASE ora805 CONNECT “dbspi/dbspipass” The local tnsnames.ora) with a service name that maps to an entry in the DBSPI Configuration file. and 8i. a critical message is sent to the management server browser: Copyright November 20001 4 .0. The DBSPI ships with specific executables for Oracle 7. you must have configured your oracle naming method (usually tnsnames.ora file would have something like this: ora805= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC)(KEY=ora805)) (ADDRESS= (PROTOCOL=TCP)(HOST=ellie)(PORT=1521)) ) (CONNECT_DATA=(SID=ora805)) ) Template details (-n option): Monitor template: DBSPI-Ora-Listener-Connect Interval: 5 minutes Monitor Program: dbspicao –c DBSPI-Ora-Listener-Connect –n Note: the dbspicao program is actually a script that determines which specific collector/analyzer to call to perform the listener check.ora file.The <name> field is the name of the database. and this exact name must be specified as a service name in the tnsnames. 8. no results are returned. Prerequisites (-n option): For each Listener you want to check. For example. Possible results: If a connection using the listener is successful. You must have configured the DBSPI on the node. If a connection cannot be made to the listener. here is a sample DBSPI Configuration file that has just one oracle database: ORACLE HOME “/opt/oracle/product/8. But it does require template customization and extra entries in the DBSPI Configuration file. Unlike the “-n” option. This database name must not be the same name as a database instance you are monitoring.“DBSPI10-30: Can not connect to the Oracle Listener using <connect string>” Advanced Listener Check Using the “-m 1” Option This mapping does not require that the database instance name specified in the DBSPI Configuration file be used as a service name in the tnsnames.ora file. But when the “-m 1” option is used. The connection alias name must match a service name in the tnsnames. and one entry to test the Listener connection to instance “ora805” using service name “ora805_L1”: ORACLE HOME “/opt/oracle/product/8. but you choose the name that is used. the DBSPI Configuration tool will not complain. When using this approach.5” DATABASE ora805 CONNECT “dbspi/dbspipass” DATABASE ora805_L1 CONNECT “dbspi/dbspipass@ora805_L1” The local tnsnames.0. here is a sample DBSPI Configuration file that has just one oracle database named ora805: ORACLE HOME “/opt/oracle/product/8.0. here is a sample DBSPI Configuration file that has two entries: one entry for metric processing of instance “ora805”. Normally the DBSPI Configuration file has one entry for each instance that will be monitored.ora file.5” DATABASE ora805 CONNECT “dbspi/dbspipass” The above type of entry is required for the DBSPI collector/analyzer to process metrics. there is not a requirement to use the database name as the service name. For example. If you do use the same database name more than once.ora file would have be something like this: Copyright November 20001 5 . it is recommended that you use a database name that is the same as the connection alias name that appears after the @. But you will get multiple metric collection cycles for that database instance. you must have a duplicate entry that includes a connection alias. This entry will be used to test connections to the Oracle Listener. For example. Copying the DBSPI-Ora-Listener-Connect template that is shipped with the product to a new template can create a sample custom template. you would also need to update all the other templates (e.. change the program to be something like this: dbspicao –m 1 –c DBSPI-My-Ora-Listener-Connect –I listener_check1 –i listener_check2 To avoid extra collection cycles.ora) with a service name that maps to an entry in the DBSPI Configuration file. Metric 1 is a nice metric to use since it is checks the status of the instance. Copyright November 20001 6 . etc) to exclude these special Listener “instances”. DBSPI-Ora-15min. Since a metric must be specified in order for this to work. the –i option is specified with the Listener connection alias as the “instance”. Actually. Example: DBSPI-My-Ora-Listener-Connect Within this template. DBSPI-Ora-05min. For example: dbspicao –c DBSPI-Ora-1d –m 42:20.56. you must have configured your oracle naming method (usually tnsnames. both the –m and –i options are used together in a new custom template to accomplish the connection check to the Listener.61 –e listener_check1 –e listener_check2 Prerequisites (-m option): For each Listener you want to check.g. DBSPIOra-1d. In addition. metric 1 is chosen using “-m 1”.ora805_L1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC)(KEY=ora805)) (ADDRESS= (PROTOCOL=TCP)(HOST=ellie)(PORT=1521)) ) (CONNECT_DATA=(SID=ora805)) ) Template customization with the “-m 1” option You must create a custom template to use the “-m 1” option. To accomplish a loop back connection through the listener. any metric processing templates you use on the node should be modified to exclude the special Listener “instances”. DBSPI-Ora-1h. Possible results (-m option): If a connection using the listener is successful. The custom template you create would call dbspicao like this: dbspicao –m 1 –c DBSPI-EXAMPLE-ORA-Listener-Connect –i DB1_L1 You must also remember to exclude these special Listener “instances” from your regular templates you are using for metric processing. DBSPI Configuration file: DATABASE db1 CONNECT "user/pass" DATABASE DB1_L1 CONNECT "user/pass@DB1_L1" Oracle tnsnames. a managed node has 1 oracle instance named db1 and one listener identified by the service name DB1_L1. a critical message is sent to the management server browser: “DBSPI10-30: Can not connect to the Oracle Listener using <connect string>” Examples: Below are more examples using the “-m 1” option. You must have created a customized a template to use the “-m 1” option.You must have configured the DBSPI on the node. If a connection cannot be made to the listener. Example with “-m 1” option: Single Oracle Listener and Instance In this example.ora file DB1_L1= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC) (KEY=db1) ) (CONNECT_DATA = (SID=db1)) ) Copyright November 20001 7 . no results are returned. Lets say you call this custom template DBSPI-EXAMPLE-ORA-Listener-Connect. and DB3_L3. Instances db1 and db2 share the same Oracle Home. identified in the tnsnames. DBSPI Configuration file: ORACLE HOME “/opt/oracle/product/8. a managed node has 3 oracle instances named db1.6” DATABASE db3 CONNECT "dbspi/pass" DATABASE DB3_L3 CONNECT “dbspi/pass@DB3_L3 Oracle tnsnames. You must have created a custom template to use the “-m 1” option. DB2_L2. db2 . Each database has its own Listener. Lets say you call it DBSPI-EXAMPLE1-ORA-Listener-Connect In this custom template you would call dbspicao like this: dbspicao –m 1 –c DBSPI-EXAMPLE1-ORA-Listener-Connect –i DB1_L1 –i DB2_L2 –i DB_L3 You must also remember to exclude these special Listener “instances” from your regular templates you are using for metric processing.0.5” DATABASE db1 CONNECT "dbspi/pass" DATABASE db2 CONNECT "dbspi/pass" DATABASE DB1_L1 CONNECT “dbspi/pass@DB1_L1” DATABASE DB2_L2 CONNECT “dbspi/pass@DB2_L2 HOME “/opt/oracle/product/8.ora file as DB1_L1.Example with “-m 1” option: One Oracle Listener to each Instance In this example.and db3.0.ora file: DB1_L1= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC) (KEY=db1) ) (CONNECT_DATA = (SID=db1)) ) DB2_L2= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC) (KEY=db2)) (CONNECT_DATA = (SID=db2)) ) DB3_L3= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC)(KEY=db3) Copyright November 20001 8 . ora file: DB1_L1= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC) (KEY=db1) ) (CONNECT_DATA = (SID=db1)) ) DB2_L2a= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC) (KEY=db2)) (CONNECT_DATA = (SID=db2)) ) Copyright November 20001 9 . One Listener services database instance db1: DB1_L1.(CONNECT_DATA = (SID=db3)) ) Example: Multiple Oracle Listeners to one Instance In this example.5” DATABASE db1 CONNECT "dbspi/pass" DATABASE db2 CONNECT "dbspi/pass" DATABASE DB1_L1 CONNECT “dbspi/pass@DB1_L1” DATABASE DB2_L2a CONNECT “dbspi/pass@DB2_L2a” DATABASE DB2_L2b CONNECT “dbspi/pass@DB2_L2b” Oracle tnsnames. DBSPI Configuration file: ORACLE HOME “/opt/oracle/product/8. Lets say you call this custom template DBSPI-EXAMPLE2-ORA-ListenerConnect. Database instance db2 is serviced by two Listeners: DB2_L2a and DB2_L2b. You must have created a customized a template to use the “-m 1” option. The custom template you create would call dbspicao like this: dbspicao –m 1 –c DBSPI-EXAMPLE2-ORA-Listener-Connect –i DB1_L1 –i DB2_L2a -i DB2_L2b You must also remember to exclude these special Listener “instances” from your regular templates you are using for metric processing. a managed node has 2 oracle instances named db1 and db2. Instances db1 and db2 share the same Oracle Home.0. DB2_L2b= (DESCRIPTION= (ADDRESS=(PROTOCOL=IPC)9KEY=db2) (CONNECT_DATA = (SID=db2)) ) Copyright November 20001 10 .
Copyright © 2024 DOKUMEN.SITE Inc.