Policy Example

  # This auto healing policy will perform a "repair" when resource is marked not healthy
    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
    # Actions defines details of various actions that could be taken,
      repair:                               # The repair action label is referenced in the policy in the actions[] statement   
        type: dcm.policy.action.ReplaceResource
          changeType: REPLACE               # Replace the resource

      reboot:                               # The reboot action label is referenced in the policy in the actions[] statement
        type: dcm.policy.action.RestartResource
          changeType: RESTART               # Reboot the server
    # Even if not used explicitly by a policy, include this to enable UX health status
    # Status reported by cloud must be active, and for VMs, the Dell Cloud Manager agent heartbeat must succeed otherwise resource will be marked as DEGRADED
      cloud_reported_status:                     # The cloud_reported_status label is referenced in the policy in a measurements: statement
        type: dcm.policy.measurement.ResourceActive
    # Criteria specify the "criteria" which is used along with the measurements to determine when to perform the actions
      status_failure:                       # The status_failure criteria label is referenced in the policy in a criterion: statement
        type: dcm.policy.criteria.False     # "False" tells the policy to perform the action in the policy if the measurement result matches "False".

Policy displayed from the console

You can display the blueprint auto healing policy from the Dell Cloud Manager console by selecting the Automation page and clicking on the policy name. In this blueprint the policy is named: repair_on_status.


repair_on_status policy