Configuring pre-event and post-event processing

Complete the following steps to set up or change the processing for an event. In this step you indicate to the Cluster Manager to use your customized pre-event or post-event commands. You only need to complete these steps on a single node. The PowerHA® SystemMirror® software propagates the information to the other nodes when you verify and synchronize the nodes.

To configure pre-event and post-events for customized event processing, complete the following steps:

  1. From the command line, enter smit sysmirror
  2. Select Custom Cluster Configuration > Events > Cluster Events > Change/Show Pre-defined Events to display a list of cluster events and subevents.
  3. Select an event or subevent that you want to configure and press Enter. SMIT displays the panel with the event name, description, and default event command shown in their respective fields.
  4. Enter field values as follows:
    Field name Description
    Event Name The name of the cluster event to be customize.
    Description A brief description of the event's function. This information cannot be changed.
    Event Command Indicates the full path of the script that will be called by PowerHA SystemMirror. You cannot edit this field.
    Notify Command (Optional) Enter the full pathname of a user-supplied script to run before and after a cluster event. This script can notify the system administrator that an event is about to occur or has occurred.

    The arguments passed to the command are: the event name, one keyword (either start or complete), the exit status of the event (if the keyword was complete), and the same trailing arguments passed to the event command.

    Pre-Event Command (Optional) If you have defined custom cluster events, press F4 for the list. Or, enter the name of a custom-defined event to run before the PowerHA SystemMirror cluster event command runs. This command is run before the "event command" script is run.

    The arguments passed to this command are the event name and the trailing arguments passed to the event command.

    Enter the full path name of a user-supplied script or the name of a custom cluster event.

    Remember that the Cluster Manager will not process the event until this pre-event script or command has completed.

    Verify that the pre-event command or script returns with an exit value of 0, otherwise the event fails with an error.

    You can specify multiple script names or custom event names separated by commas.

    Post-Event Command (Optional) If you have defined custom cluster events, press F4 for the list. Or, enter the name of the custom event to run after the PowerHA SystemMirror cluster event command executes successfully. This script provides post-processing after a cluster event.

    Enter the full path name of a user-supplied script or the name of a custom cluster event.

    The arguments passed to this command are the event name, event exit status, and the trailing arguments passed to the event command.

    Verify that the post-event command or script returns with an exit value of 0, otherwise the event fails with an error.

    You can specify multiple script names or custom event names separated by commas.

  5. Press Enter to add this information to the PowerHA SystemMirror Configuration Database.
  6. Return to the Events menu and synchronize your event customization by selecting the Verify and Synchronize Cluster Configuration (Advanced) option. Note that all PowerHA SystemMirror event scripts are maintained in the /usr/es/sbin/cluster/events directory. The parameters passed to a script are listed in the script's header.
    Note: You or a third-party system administrator can reset the PowerHA SystemMirror tunable values, such as cluster event customizations, to their installation-time defaults.