Health indicator configuration updates using the CLP

You can update the health indicator configuration for a particular health indicator. You can make updates to the global settings or to the object settings for a particular object.

The UPDATE ALERT CONFIGURATION command has four sub-clauses that cover the different update options. Only one sub-clause can be used in each UPDATE ALERT CONFIGURATION command. To use more than one of the options, multiple UPDATE ALERT CONFIGURATION commands must be issued.

The first sub-clause, SET parameter-name value, provides support to update:
  • The evaluation flag
  • The warning and alarm thresholds (if applicable)
  • The sensitivity flag
  • The action flag
The corresponding parameter names for these settings are:
  • THRESHOLDSCHECKED
  • WARNING and ALARM
  • SENSITIVITY
  • ACTIONSENABLED

The other three sub-clauses provide support to add, to update, and to delete script or task actions.

The following commands update a threshold-based health indicator configuration for the db.spilled_sorts health indicator on the SAMPLE database. The update changes the warning threshold to 25, to enable actions, and to add a script action:
DB2 UPDATE ALERT CONFIGURATION FOR DATABASE ON SAMPLE USING DB.SPILLED_SORTS
    SET WARNING 25, ACTIONSENABLED YES
DB2 UPDATE ALERT CONFIGURATION FOR DATABASE ON SAMPLE USING DB.SPILLED_SORTS
    ADD ACTION SCRIPT c:\myscript TYPE OS COMMAND LINE PARAMETERS 'space' 
    WORKING DIRECTORY c:\ ON ALARM USER dba1 PASSWORD dba1
The following commands update a state-based health indicator configuration for the ts.ts_util health indicator for the global settings. The update defines an action to run when any table space is in backup pending state.
DB2 UPDATE ALERT CONFIGURATION FOR TABLESPACES USING TS.TS_UTIL
    SET ACTIONSENABLED YES
DB2 UPDATE ALERT CONFIGURATION FOR TABLESPACES USING TS.TS_UTIL
    ADD ACTION TASK 0.1 ON ATTENTION 32 ON localhost USER dba1 PASSWORD dba1
This update will apply to all table spaces for the instance that do not have customized settings for this health indicator.
When adding actions to a health indication configuration, the options for the ON condition clause are based on the type of health indicator:
  • For a threshold-based health indicator, WARNING and ALARM are valid conditions.
  • For a state-based health indicator, the ON ATTENTION state option must be used. A valid numeric state, as defined for the health indicator, should be used. The database manager and database operational state values can be found in sqllib\include\sqlmon.h. The table space and table space container operational values are listed in sqllib\include\sqlutil.h. Note that actions cannot be executed for the database manager down state. Refer to the description of the db2.db2_op_status health indicator for details.