3.2.7 Setting up HA Monitor Kit

Once you have finished setting up the shared resources to be used by Oracle, set up HA Monitor Kit. Setting up HA Monitor Kit involves setting up the server start, termination, and monitoring commands, as well as setting up the control definition files.

Organization of this subsection
(1) Setting up the server start, termination, and monitoring commands
(2) Setting up control definition files

(1) Setting up the server start, termination, and monitoring commands

HA Monitor Kit provides sample files for the server start, termination, and monitoring commands. Copy these files to the desired directory in each server and set them up according to the environment. We recommend that you copy these files to HA Monitor's environment settings directory (/opt/hitachi/HAmon/etc).

The following table shows the directories for storing the sample files for the server start, termination, and monitoring commands provided by HA Monitor Kit.

Table 3-1 Directories for storing the sample files for the server start, termination, and monitoring commands

CommandStorage directory
Server start command/opt/hitachi/HAmonOra/lib/actcommand
Server termination command/opt/hitachi/HAmonOra/lib/termcommand
Server monitoring command/opt/hitachi/HAmonOra/lib/patrolcommand
Server monitoring command runtime shell/opt/hitachi/HAmonOra/lib/patrol.sh

The names of the copied files need not be the same as those of the copying source files. If simply copying files will result in duplicate file names because you are building multiple servers, change the directory at the copying destination or change the file name to avoid duplication.

For details about how to set up each command, see 4. Setting Up the Server Start, Termination, and Monitoring Commands.

(2) Setting up control definition files

You need to set up a control definition file for each Oracle instance or Oracle listener that HA Monitor Kit controls. Copy the sample control definition files provided by HA Monitor Kit, rename them, and then set environment variables and modify the parameter values in the files as needed. If there are multiple Oracle instances or Oracle listeners to be monitored, set up a control definition file for each Oracle instance or Oracle listener.

The following table shows the source control definition files to copy and the copy destination directories.

Table 3-2 Source control definition files to copy and the copy destination directories

Control definition fileSource fileCopy destination directory
Oracle instance control definition file/opt/hitachi/HAmonOra/lib/orcl1.env/opt/hitachi/HAmon/etc/HAmonOra_etc/instance
Oracle listener control definition file/opt/hitachi/HAmonOra/lib/LISTENER.env/opt/hitachi/HAmon/etc/HAmonOra_etc/listener

Rename each file as shown below. Replace the italicized parts with the applicable values.

When copying a file, be careful not to accidentally overwrite an existing file at the copy destination.

The following explains the file details:

Description format

Specify one parameter per line using the format parameter-name=value. Do not enter a blank space before or after parameter, the equal sign (=), and value. You can specify parameters in any order.

If you want to set environment variables, specify them one per line using the format environment-variable-name=value.

Parameter detail

The following table shows the details of the parameters that can be specified.

Table 3-3 Details of the parameters that can be specified in the control definition files

Parameter nameDescription
ORACLE_SIDSpecify this parameter in the Oracle instance control definition file. Specify the value of the ORACLE_SID environment variable (instance identifier) of the Oracle instance to be controlled.
For details about the ORACLE_SID environment variable, see the Oracle documentation.
LISTENER_NAMESpecify this parameter in the Oracle listener control definition file. Specify the listener name of the Oracle listener to be controlled. For details about listener names, see the Oracle documentation.
ORACLE_BASESpecify the value of the ORACLE_BASE environment variable (Oracle base directory) of the Oracle instance or Oracle listener to be controlled.
For details about the ORACLE_BASE environment variable, see the Oracle documentation.
ORACLE_HOMESpecify the value of the ORACLE_HOME environment variable (Oracle home directory) of the Oracle instance or Oracle listener to be controlled.
For details about the ORACLE_HOME environment variable, see the Oracle documentation.
ORACLE_USERSpecify the account name of the Oracle user. For details about Oracle users, see the Oracle documentation.
DB_NOACCESSSpecify this parameter in the Oracle instance control definition file. Specify whether SQL will be used to access the Oracle instance. You can specify either of the following values:
  • yes: SQL is not used to access the Oracle instance. Only process operation is monitored without monitoring the Oracle instance's status or slowdown.
  • no: SQL is used to access the Oracle instance to monitor the Oracle instance's status, slowdown, and process operation.
If this parameter is omitted, no is assumed. Specify yes if you want to use the following types of operations:
  • Operation in which HA Monitor Kit is prohibited from accessing the database
  • Operation in which the ALTER SYSTEM SUSPEND SQL statement is used to prohibit database access
  • Operation in which you want to put the Oracle instance in a status other than OPEN
LISTENER_NOACCESSSpecify this parameter in the Oracle listener definition file. Specify whether the listener control utility will be used to access Oracle listener. You can specify either of the following values:
  • yes: The listener control utility is not used. Only process operation is monitored without monitoring the Oracle listener's slowdown.
  • no: The listener control utility is used to monitor the Oracle listener's slowdown and process operation.
If this parameter is omitted, no is assumed.
PATROLSpecify the length of time (in seconds) after which the Oracle instance or Oracle listener that has been accessed is deemed to have slowed down. You can specify a value between 60 and 3600.
The value you specify for this parameter is ignored if you specified yes for the DB_NOACCESS or LISTENER_NOACCESS parameter.
ABORT_LIMITSpecify a value between 10 and 3600 (seconds) as the wait time before shifting to forced termination if normal termination does not execute successfully.

Example

Examples of control definition files are shown below. These examples have the same content as the sample files.

Oracle instance control definition file (/opt/hitachi/HAmon/etc/HAmonOra_etc/instance/orcl1.env):

ORACLE_SID=orcl1
ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/product/10.2.0/db_1
ORACLE_USER=oracle
PATROL=120
ABORT_LIMIT=180

Oracle listener control definition file (/opt/hitachi/HAmon/etc/HAmonOra_etc/listener/LISTENER.env):

LISTENER_NAME=LISTENER
ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/product/10.2.0/db_1
ORACLE_USER=oracle
PATROL=120
ABORT_LIMIT=180

Notes: