Enterprise Distributed Application Service (EDAS) allows you to create notification policies and specify dispatch rules for alert events. If a dispatch rule is triggered, EDAS sends alert notifications to the specified contacts by using the notification methods that you specify. This way, the contacts can resolve issues at the earliest opportunity.
Prerequisites
Contacts are created. For more information, see Create a contact.
Create a notification policy
Log on to the EDAS console.
In the left-side navigation pane, click . In the top navigation bar, select a region. In the upper part of the page, select a namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Then, find the application that you want to deploy and click the application name.
In the left-side navigation pane, choose .
On the Notification Policy page, click Create Notification Policy in the upper-right corner.
On the right side of the page that appears, enter a name for the notification policy in the top field.
In the Match Alert Event Rules section, perform the following steps to configure a dispatch rule:
Specify a source of alert events or select Do not filter sources.
If you specify a source of alert events, EDAS processes alert events of the specified source and sends alert notifications based on the dispatch rule that you configure.
If you select Do not filter sources, EDAS processes all alert events and sends alert notifications based on the dispatch rule that you configure.
Configure dispatch conditions. You can use a custom field or select an existing field. For example, you can specify the following condition: alertname is equal to PodRestart.
The existing fields are classified into the following types:
The fields that are included in an alert rule expression.
The fields that you create when you create an alert rule in Managed Service for Prometheus.
Default fields that are provided by EDAS. The following table describes the default fields.
Field
Description
alertname
The name of the alert. The format is 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 region ID.
_aliyun_arms_userid
The user ID.
_aliyun_arms_involvedObject_type
The subtype of the associated object. Example: ManagedKubernetes and ServerlessKubernetes.
_aliyun_arms_involvedObject_kind
The type of the associated object, such as app and cluster.
_aliyun_arms_involvedObject_id
The ID of the associated object.
_aliyun_arms_involvedObject_name
The name of the associated object.
NoteIf you want an alert to be generated only when multiple conditions are met, click + condition to add another condition.
If you want an alert to be generated when one of the specified conditions is met, click + add rule to add another condition in a new dispatch rule.
In the Event Handling section, configure parameters based on your business requirements. The following table describes the parameters.
Parameter
Description
Processing Method
Generate Alerts: Alerts are generated and sent to contacts when alert events are detected.
Do Not Generate Alerts (Drop Events): Alerts are not generated and sent to contacts when alert events are detected.
NoteIf you create two notification policies that use the same settings except the Processing Method parameter, the notification policy whose Processing Method parameter is set to Do Not Generate Alerts (Drop Events) has a higher priority than the notification policy whose Processing Method parameter is set to Generate Alerts. In this case, alert notifications are not sent to contacts when alert events are detected.
Advanced Settings
Event Group
Do not group: All alerts are sent to contacts in one notification.
Specifies that events with the same field content are assigned to a group: You can select fields to group alert events. Alerts with the same field are sent to contacts in one notification.
Automatic Alert Recovery
Specifies whether the status of an alert automatically changes to resolved when all events related to the alert are resolved. The system notifies contacts when the alert status changes to Resolved.
In the When an alert is triggered section, configure parameters based on your business requirements. The following table describes the parameters.
Parameter
Description
Contacts
The recipients of alert notifications. You can specify one or more contacts, contact groups, or DingTalk groups to receive alert notifications. For information about how to create a contact, see Create a contact.
Notification Method
The method that is used to send alert notifications. Valid notification methods: DingTalk, Email, Text messages, phone calls, and WebHook. You can specify one or more notification methods.
NoteBefore a contact can receive alert notifications by using phone calls, the phone number of the contact must be verified. For more information, see Verify a mobile number.
You can create custom notification templates. Click Notification template. In the Notification Template dialog box, configure templates for notifications that are sent by email, text message, or phone.
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 process alerts that remain unresolved for an extended period of time. Valid values:
Recurring Notifications: If you select Recurring Notifications, you must specify the interval at which alert notifications are sent. EDAS sends alert notifications at the specified interval during the specified time period before the alerts are resolved.
Escalation Policy: If you select Escalation Policy, you must select an existing escalation policy from the drop-down list or create an escalation policy. For more information, see Create and manage an escalation policy.
NoteTo view the details of a selected escalation policy, click Details.
Ticket System
The ticket system to which alert notifications are sent.
After the configuration is complete, click the icon in the upper-right corner.
Manage a notification policy
After you create a notification policy, the policy is displayed in the Notification Policies section. You can manage notification policies in the Notification Policies section by using one of the following methods:
Click the More icon next to the notification policy that you want to manage and select Edit, Disable, Enable, Copy, or Delete to modify, disable, enable, copy, or delete the notification policy.
Click the notification policy that you want to manage. Then, you can click the icons in the upper-right corner of the page that appears to modify, refresh, copy, or delete the notification policy.