Enterprise Distributed Application Service (EDAS) allows you to configure notification policies to specify dispatch rules for alert events. When an alert rule is triggered, EDAS sends alert notifications to the specified contacts based on the notification method that you specify. This reminds the contacts to take necessary actions to resolve the alert.

Prerequisites

Contacts are created. For more information, see Create a contact.

Create a notification policy

  1. Log on to the EDAS console.
  2. On the Applications page, select EDAS Kubernetes Cluster or Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Then, click the name of the application for which you want to create a notification policy.
  3. In the left-side navigation pane, choose Alert Management > Dispatch.
  4. On the Notification policy page, click Create Notification policy in the upper-right corner.
  5. In the upper part of the right-side section, enter a name for the notification policy in the field.
  6. In the Distribution rules section, perform the following steps to configure a dispatch rule:
    1. Specify a source of alert events.
      • If you specify a source, EDAS filters alert events of the specified source based on the dispatch rule that you configure in the notification policy.
      • If you select Do not filter the source, EDAS filters all alert events and sends alert notifications based on the dispatch rule that you configure in the notification policy.
    2. Specify the expression of a dispatch condition. You can customize a tag or select an existing tag for the dispatch condition, for example, alertnameEqualPodRestart.

      EDAS provides the following three types of tags:

      • The tags that are carried in the metrics of the alert rule expression.
      • The tags that are created by alert rules in Prometheus Service.
      • The default tags that are provided by EDAS. The following table describes the default tags.
        Tag Description
        alertname The name of the alert, in the format of Alert name_Cluster name.
        _aliyun_arms_alert_level The level of the alert.
        _aliyun_arms_alert_type The type of the alert.
        _aliyun_arms_alert_rule_id The ID of the alert rule.
        _aliyun_arms_region_id The ID of the region.
        _aliyun_arms_userid The ID of the Alibaba Cloud account.
        _aliyun_arms_involvedObject_type The subtype of the associated object. Example: ManagedKubernetes or ServerlessKubernetes.
        _aliyun_arms_involvedObject_kind The type of the associated object. Example: app or cluster.
        _aliyun_arms_involvedObject_id The ID of the associated object.
        _aliyun_arms_involvedObject_name The name of the associated object.
      Note
      • If you want an alert to be generated only when multiple dispatch conditions are met, click +condition to add another dispatch condition.
      • If you want an alert to be generated when one of the specified dispatch conditions is met, click +Add rules to add another dispatch condition.
  7. In the Event Handling section, set the parameters that are described in the following table.
    Parameter Description
    Processing method
    • Generate alerts: EDAS sends the detected alerts to the contacts.
    • No alerts (dropped events): EDAS does not send the detected alerts to the contacts.
    Note If two identical notification policies are configured and the Processing method parameter of the notification policies is respectively set to Generate alerts and No alerts (dropped events), the notification policy for which No alerts (dropped events) is set takes precedence over the notification policy for which Generate alerts is set. In this case, no alert is sent to the contacts.
    Advanced settings
    Event group
    • Do not group: All alerts are sent to the contacts in a single notification.
    • Specifies that events with the same field content are assigned to a group: Alerts with different grouping fields are sent to the contacts in separate notifications.
    Automatic alert recovery Specifies whether to automatically change the status of an alert to resolved when all events related to the alert are resolved. When the status of an alert changes to resolved, EDAS sends a notification to the contacts.
  8. In the Generate alerts section, set the parameters that are described in the following table.
    Parameter Description
    Contact The recipients of alert notifications. You can specify one or more contacts, contact groups, or DingTalk groups to receive alert notifications. For more information about how to create a contact, see Create a contact.
    Notification method The method that is used to send alert notifications. Valid values: DingTalk, Mail, SMS, Phone call, and WebHook. You can specify one or more notification methods.
    Note
    • Before a contact can receive alert notifications by using phone calls, you must verify the mobile number of the contact. For more information, see Verify a mobile number.
    • To configure the formats of notifications, click Notification template. In the Notification template dialog box, configure the formats of email, text message, and phone call notifications based on your business requirements.
    Notification period The time range during which alert notifications are repeatedly sent.
    Update notification method The method that is used to remind the contacts to handle alerts that remain unresolved for an extended period of time. Valid values:
    • repeated notification: If you select repeated notification, you must set the interval at which alert notifications are sent. Then, EDAS sends alert notifications at the specified interval during the specified time range before the alerts are resolved.
    • update policy: If you select update policy, you must select an existing escalation policy from the drop-down list or create an escalation policy. For more information, see Configure an escalation policy.
      Note To view the details of the selected escalation policy, click Details.
    Ticket system The ticket system to which alert notifications are sent.
  9. After the settings are complete, click the Save icon icon in the upper-right corner.

Manage notification policies

After you create a notification policy, the notification policy is displayed in the Notification policy list section. You can manage notification policies in the Notification Policy List section.

  • To modify, disable, enable, copy, or delete a notification policy, click the More icon next to the notification policy and select Editing, Disable, Enable, Copy, or Delete.
  • Click the notification policy that you want to manage. In the right-side section, click the corresponding icon in the upper-right corner to modify, refresh, copy, or delete the notification policy.