resstatechange event trigger

Description

This trigger is invoked under the following conditions: 

  • Resource goes from offline to online.
  • Resource goes from online to offline.
  • Resource goes from online to faulted.
  • Resource goes from faulted to offline. (When fault is cleared on non-persistent resource.)
  • Resource goes from faulted to online. (When faulted persistent resource goes online or faulted non-persistent resource is brought online outside VCS control.)
  • Resource is restarted by an agent because resource faulted and RestartLimit was greater than 0.

This event trigger is configurable. 

Usage

- resstatechange  triggertype system  resource previous_state new_state 

  • triggertype—represents whether trigger is custom (triggertype=0) or internal (triggertype=1).

    For this trigger, triggertype=0.

  • system—represents the name of the system.
  • resource—represents the name of the resource.
  • previous_state—represents the resource's previous state.
  • new_state—represents the resource's new state.

To enable the trigger

This event trigger is not enabled by default. You must enable resstatechange by setting the attribute TriggerResStateChange to 1 in the main.cf file, or by issuing the command: 

hagrp -modify service_group TriggerResStateChange 1

Note   Use the resstatechange trigger carefully. For example, enabling this trigger for a service group with 100 resources means 100 hatrigger processes and 100 resstatechange processes are fired each time the group is brought online or taken offline. Also, this is not a "wait-mode trigger. Specifically, VCS invokes the trigger and does not wait for trigger to return to continue operation