Health monitor alert actions on combined states

Alert actions are tasks or scripts that are run when a health indicator goes into an alert state.

The health monitor alert actions defined for the health indicator ts.ts_op_status on a single alert state are executed whenever this state is set for the table space, irrespective of the other combined states. This makes it possible to run alert actions on a specific table space state even when it is set in conjunction with other states.

In the following example, an alert action script1 defined on attention state QUIESCED:share will run, even if the table space state is QUIESCED:share and QUIESCE:update at the same time.

db2 call SYSPROC.ADMCMD('update alert cfg for tablespaces using ts.ts_op_status 
    set actionsenabled yes')
db2 call SYSPROC.ADMCMD('update alert cfg for tablespaces using ts.ts_op_status 
    add action script /home/guest001/script1 type operating system command line 
    parameters userParam working directory /home/guest001/ 
    on attention QUIESCED_SHARE on aix1 user guest001 using passw0rd')

In the following example, an alert action defined using a combination of states ( QUIESCED:share + QUIESCED:update = 3 ) is executed if and only if the table space state is both QUIESCED:share and QUIESCED:update.

db2 call SYSPROC.ADMCMD('update alert cfg for tablespaces using ts.ts_op_status 
    set actionsenabled yes')
db2 call SYSPROC.ADMCMD('update alert cfg for tablespaces using ts.ts_op_status 
    add action script /home/guest001/script1 type operating system command line 
    parameters userParam working directory /home/guest001/ 
    on attention 3 on aix1 user guest001 using passw0rd')

Health monitor alert actions defined on an object with the same action attributes (name, working directory, command line parameters, host, user and password) run only once, even if it was defined on multiple alert states.

In the following example, the same action is defined on two different alert states. The action is only executed once for a given table space, even if the table space state is in both QUIESCED:share and QUIESCED:update.

db2 call SYSPROC.ADMCMD('update alert cfg for tablespaces using ts.ts_op_status 
    add action script /home/guest001/script1 type operating system command line 
    parameters userParam working directory /home/guest001/ 
    on attention QUIESCED_SHARE on aix1 user guest001 using passw0rd')
db2 call SYSPROC.ADMCMD('update alert cfg for tablespaces using ts.ts_op_status 
    add action script /home/guest001/script1 type operating system command line 
    parameters userParam working directory /home/guest001/ 
    on attention QUIESCED_UPDATE on aix1 user guest001 using passw0rd')