Policies

You define the auto healing policies as sections inside the policies: section of the template and give them unique label names. In those policies you define the measurements and criteria which trigger the actions you wish to be performed.

Policies are defined with a section name, a type:, a measurement:, criterion: and actions.

Attention

It is not recommended to “share” measurement, criterion, and actions with other policies defined in the template. Each policy you define in a template should have their own set of measurement, criterion, and actions.

section name

You specify a section name for your policy which must be unique in the template and is referenced in a group.

Example: repair_on_status:

Type

The type: specifies the type of policy. There is currently only one auto healing policy type.

  • type: dcm.policy.types.BasicPolicy

Measurement

Measurements are where you define properties for Dell Cloud Manager to use to determine when to perform the actions you define in the policy.

In the policy you define a measurement: statement which references a measurements section in the template which contains the measurement definitions.

  • measurement: - References a measurements section in the template by it’s section name.
Example: measurement: your-measurement-section

Criterion

Criteria are where you define how to evaluate the measurements in determining when to trigger an action.

In the policy you define a criterion: statement which references a criteria section in the template which contains the criteria definitions.

  • criterion: - References a criteria section in the template by it’s section name.
Example: criterion: your-criteria-section

Actions

Actions are where you define what actions you want Dell Cloud Manager to perform.

In the policy you define a actions statement which references one or more actions sections which contains the actions definitions.

  • actions - References one or more actions sections in the template by their section name.

Example: actions:[ your-action-section ]

Note

Multiple actions are supported ( e.g. actions:[action1, action2, etc.] ).

Example

policies:
  # This auto healing policy will perform a "repair" when resource is marked not healthy
  repair_on_status:
    type: dcm.policy.types.BasicPolicy
    actions: [repair]                       # The repair action is defined in the actions: section of the template
    measurement: cloud_reported_status      # The cloud_reported_status measurement is defined in the measurements: section of the template
    criterion: status_failure               # The status_failure is a label defined in the criteria: section of the template