- resstatechange triggertype system resource previous_state new_state
The variable triggertype represents whether trigger is custom (triggertype=0) or internal (triggertype=1).
Note For this trigger, triggertype=0.
The variable system represents the name of the system.
The variable resource represents the name of the resource.
The variable previous_state represents the resource's previous state.
The variable new_state represents the resource's new state.
Description
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:
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.
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