Configuring the notification process

The RCM can execute a process when an event occurs, for example, when failover begins. This process is a script or a program that you create and then define in the RCM configuration file using the NOTIFICATION_PROCESS parameter.

When working with the RCM notification process, be aware that:

Table 4-5 lists the events that trigger the RCM notification process.

Table 4-5: Notification process events

Notification ID

Event description

1

The RCM has detected a possible failover situation where the active Adaptive Server is not responding. The RCM is about to enter a wait state to determine if the active Adaptive Server is down, or if it will automatically recover.

2

The failover process has started. The RCM has determined that the active Adaptive Server is down and is failing over in the replication environment.

3

The failover has been aborted, because the active Adaptive Server has recovered before the RCM started the failover process.

4

The RCM cannot connect to Replication Server. The RCM switches the users to the standby Adaptive Server without failing over the logical connections in Replication Server.

5

The RCM cannot start the Replication Agent in the standby Adaptive Server after switching the logical connections in Replication Server.

6

Executing the failover process in Replication Server has failed. This occurs when the RCM unsuccessfully executes either the switch active or the quiesce commands.

7

The RCM has finished the Replication Server failover process. The RCM is about to switch users to the standby Adaptive Server.

8

Switching the users in OpenSwitch from the active Adaptive Server to the standby Adaptive Server has failed. The active Adaptive Server is locked, all existing connections are suspended, and new users cannot log in.

9

The RCM failover process has completed.

10

The RCM has exited, probably because the connection to the primary OpenSwitch is lost, or because of some internal error.

11

The RCM has lost the connection to the OpenSwitch. The message identifies which OpenSwitch server failed. The RCM exits if the OpenSwitch server is not a secondary OpenSwitch server in a dual OpenSwitch environment.

NoteIn a dual OpenSwitch environment, if the primary OpenSwitch fails, the RCM sends this notification and notification ID 10 to the administrator, then exits. If the secondary OpenSwitch fails, the RCM sends this notification ID 11 to the administrator, but does not exit.

12

A test notification is executed when the user starts the RCM with the -a (analyze) option.

The RCM displays a notification ID and a text message in its log when any of the events in Table 4-5 occur. The text message is similar to the event description in the table. To determine what process you want performed when events occur, read the event description in Table 4-5.

Some examples of processes that can be triggered by events are:

For example, the following segment of the configuration file sets the NOTIFICATION_PROCESS parameter to execute a program called email.sh when an event occurs:

# Set notification process to email me NOTIFICATION_PROCESS  = email.sh

To set up the notification process to trigger a program or script, you must set the NOTIFICATION_PROCESS parameter. If you do not include this parameter, the RCM does not send notification of events. See “Understanding RCM configuration parameters” for more information.

The RCM records all events in its log, so if you do not set the NOTIFICATION_PROCESS parameter but need to troubleshoot the failover, examine the RCM log, called rcm.log, in the RCM subdirectory.