Ensure the telemetry alert config is deleted

    name
        An optional description of the alarms (not currently supported by telemetry API)

    deployment_id
        Specifies the ID of the root deployment resource
        (replica set cluster or sharded cluster) to which this alert definition is attached

    metric_name
        Specifies the unique ID of the metric to whose values these thresholds will be applied

    api_key
        Telemetry api key for the user

    profile
        A dict with telemetry config data. If present, will be used instead of
        api_key.

def absent(name, deployment_id, metric_name, api_key=None, profile="telemetry"):
    '''
    Ensure the telemetry alert config is deleted

    name
        An optional description of the alarms (not currently supported by telemetry API)

    deployment_id
        Specifies the ID of the root deployment resource
        (replica set cluster or sharded cluster) to which this alert definition is attached

    metric_name
        Specifies the unique ID of the metric to whose values these thresholds will be applied

    api_key
        Telemetry api key for the user

    profile
        A dict with telemetry config data. If present, will be used instead of
        api_key.
    '''
    ret = {'name': metric_name, 'result': True, 'comment': '', 'changes': {}}

    is_present = __salt__['telemetry.get_alert_config'](
        deployment_id, metric_name, api_key, profile)

    if is_present:
        alert_id = is_present.get('_id')
        if __opts__['test']:
            ret['comment'] = 'alert {0} is set to be removed from deployment: {1}.'.format(metric_name, deployment_id)
            ret['result'] = None
            return ret
        deleted, msg = __salt__['telemetry.delete_alarms'](
            deployment_id, alert_id, is_present.get('condition', {}).get('metric'), api_key, profile)

        if deleted:
            ret['changes']['old'] = metric_name
            ret['changes']['new'] = None
        else:
            ret['result'] = False
            ret['comment'] = 'Failed to delete alert {0} from deployment: {1}'.format(metric_name, msg)
    else:
        ret['comment'] = 'alarm on {0} does not exist within {1}.'.format(metric_name, deployment_id)
    return ret