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.
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
Command | Storage 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.
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 file | Source file | Copy 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 name | Description |
---|---|
ORACLE_SID | Specify 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_NAME | Specify 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_BASE | Specify 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_HOME | Specify 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_USER | Specify the account name of the Oracle user. For details about Oracle users, see the Oracle documentation. |
DB_NOACCESS | Specify 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:
|
LISTENER_NOACCESS | Specify 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:
|
PATROL | Specify 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_LIMIT | Specify 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_SID=orcl1 |
LISTENER_NAME=LISTENER |
Notes: