4.4.1 Server monitoring command

HA Monitor Kit provides a sample file of the server monitoring command. Copy the sample file and set it up as explained in this chapter, and customize it as needed. For the storage location and copying destination of the sample file, see 3.2.7(1) Setting up the server start, termination, and monitoring commands.

The server monitoring command sample file executes the patrol_proc() shell function that describes the process to monitor Oracle instances and Oracle listeners at the user-specified time interval.

The following figure shows the content of the server monitoring command sample file.

Figure 4-3 Content of the server monitoring command sample file

[Figure]

Numbers 1 through 4 in the figure are explained below.

  1. This is the environment variable for setting up the operating environment necessary for monitoring programs.
    For details about the content to be set up here, see (1) Environment variables.
  2. This is the Oracle instance monitoring process.
    The process for executing the haorainsptl command to monitor the Oracle instance specified by the instance identifier is described here. For details about the content to be set up here, see (2) Setup method.
    For details about the haorainsptl command, see haorainsptl (Checks the status of an Oracle instance) in 4.5 Commands used for setting up the server start, termination, and monitoring commands.
  3. This is the Oracle listener monitoring process.
    The process for executing the haoralsnrptl command to monitor the Oracle listener specified by the listener name is described here. For details about the content to be set up here, see (2) Setup method.
    For details about the haoralsnrptl command, see haoralsnrend (Terminates an Oracle listener) in 4.5 Commands used for setting up the server start, termination, and monitoring commands.
  4. This is the process executed by the patrol_proc() shell function.
    To add your own process, add it inside this patrol_proc() shell function. For details about the content to be set up here, see (3) Server monitoring command customization
Organization of this subsection
(1) Environment variables
(2) Setup method
(3) Server monitoring command customization

(1) Environment variables

This subsection explains the environment variables indicated by 1 in Figure 4-3 Content of the server monitoring command sample file.

(2) Setup method

This subsection explains how to set up the monitoring processes 2 and 3 in Figure 4-3 Content of the server monitoring command sample file.

To change the order for monitoring Oracle instances and Oracle listeners, change the monitoring order in the file.

(3) Server monitoring command customization

You can add non-Oracle application processes necessary for a job, and user-specific processes, to the server monitoring command. When customizing the command, note the following: