alicloud_arms_dispatch_rule

Provides a Application Real-Time Monitoring Service (ARMS) Alert Dispatch Rule resource.

For information about Application Real-Time Monitoring Service (ARMS) Alert Dispatch Rule and how to use it, see What is Alert Dispatch_Rule.

Example Usage

Basic Usage

resource "alicloud_arms_alert_contact" "default" {
  alert_contact_name = "example_value"
  email              = "example_value@aaa.com"
}
resource "alicloud_arms_alert_contact_group" "default" {
  alert_contact_group_name = "example_value"
  contact_ids              = [alicloud_arms_alert_contact.default.id]
}

resource "alicloud_arms_dispatch_rule" "default" {
  dispatch_rule_name = "example_value"
  dispatch_type      = "CREATE_ALERT"
  group_rules {
    group_wait_time = 5
    group_interval  = 15
    repeat_interval = 100
    grouping_fields = [
    "alertname"]
  }
  label_match_expression_grid {
    label_match_expression_groups {
      label_match_expressions {
        key      = "_aliyun_arms_involvedObject_kind"
        value    = "app"
        operator = "eq"
      }
    }
  }

  notify_rules {
    notify_objects {
      notify_object_id = alicloud_arms_alert_contact.default.id
      notify_type      = "ARMS_CONTACT"
      name             = "example_value"
    }
    notify_objects {
      notify_object_id = alicloud_arms_alert_contact_group.default.id
      notify_type      = "ARMS_CONTACT_GROUP"
      name             = "example_value"
    }
    notify_channels = ["dingTalk", "wechat"]
  }
}

Argument Reference

The following arguments are supported:

group_rules

The group_rules supports the following:

label_match_expression_grid

The label_match_expression_grid supports the following:

label_match_expression_grid-label_match_expression_groups

The label_match_expression_groups supports the following:

label_match_expression_grid-label_match_expression_groups-label_match_expressions

The label_match_expressions supports the following:

notify_rules

The notify_rules supports the following:

notify_rules-notify_objects

The notify_objects supports the following:

Attributes Reference

The following attributes are exported:

Import

Application Real-Time Monitoring Service (ARMS) Alert Contact can be imported using the id, e.g.

$ terraform import alicloud_arms_dispatch_rule.example <id>