By creating a notification policy, you can define matching rules for alert events. When a matching rule is triggered, the system sends alert notifications to specified notification objects using your configured methods. This prompts recipients to resolve the issue.
Prerequisites
You have created a notification object. For more information, see notification object.
Create a notification policy
Log on to the Managed Service for OpenTelemetry console. In the left-side navigation pane, choose .
-
Click the Notification Policies tab, click Create Notification Policy, and then enter a name for the policy.
-
In the Matching Rule section, configure the matching rules for alert events.
ImportantSilence policies take precedence over notification policies. An alert event that matches a silence policy is suppressed and is not evaluated against notification policies. To learn how to create a silence policy, see silence policy.
-
Select a data source.
-
Specified source: The policy sends notifications only for alert events from the specified integration.
-
No preset source: The policy sends notifications for alert events from all sources.
-
-
Set the matching rule expression. You can define custom tags or select from existing tags.
Existing tags include:
-
Tags from the metrics in an alert rule expression. For information about how to create tags for alert rules in Managed Service for Prometheus, see Prometheus alert rules.
-
Default tags provided by ARMS. The default tags are described in the following table.
Category
Tag
Description
Common fields
alertnameThe alert name.
clusternameThe cluster name.
severityThe alert severity.
-
P1
-
P2
-
P3
-
P4
-
Default
namespaceThe namespace.
pod_nameThe pod name.
System-preset fields
_aliyun_arms_integration_nameThe integration name. The default integration name for alerts reported by ARMS is
ARMS-DEFAULT._aliyun_arms_involvedObject_idThe ID of the involved object.
_aliyun_arms_involvedObject_nameThe name of the involved object.
_aliyun_arms_region_idThe region ID.
_aliyun_arms_alert_rule_idThe alert rule ID.
_aliyun_arms_alert_typeThe alert rule type:
-
101: Prometheus alert -
5: Application Monitoring alert -
4: Browser Monitoring alert
-
Note-
To trigger an alert only when all conditions are met (AND logic), click Add Condition.
-
To trigger an alert when any of the rules is met (OR logic), click Add Rule.
-
-
Click Next.
-
-
In the Event Group section, configure how alert events are grouped, and then click Next.
-
Do not group: Each alert event triggers a separate notification.
-
Set group-by fields: Alert events with the same field values are aggregated into a single alert notification.
-
-
In the Notification Objects section, configure the following parameters.
-
Click + Add notification object to select notification objects.
Notification object types:
-
Contact: After you select a contact, you also need to select a notification method, such as phone call, SMS, or email.
-
Contact group: After you select a contact group, you also need to select a notification method, such as phone call, SMS, or email.
-
Shift: After you select a shift, you also need to select a notification method, such as phone call, SMS, or email.
-
DingTalk/Lark/WeCom: Send alert notifications to DingTalk, Lark, or WeCom.
-
Webhook: Send alert notifications to a webhook URL.
-
-
Choose whether to send a clearing notification when an alert is cleared.
Send clearing notification: If enabled, the system sends a notification to the specified recipients when the alert is cleared. An alert is cleared when all its related events are resolved, and its status is automatically changed to Resolved.
-
Configure a notification template. For more information, see Configure notification templates and webhook templates.
-
Set a notification time range. Alert notifications are sent only during the specified period.
-
Optional: Select a ticketing system to send alerts to. For information about how to integrate a ticketing system, see action integration.
-
Click Next.
-
-
In the Policy to Repeat/Escalate/Clear Alerts section, configure repeat notifications or an escalation policy, and then click Next.
-
Repeat notifications: If an alert remains unresolved, the system resends notifications at the specified interval until the alert is cleared.
-
Use escalation policy: If an alert remains unresolved, notifications are sent to other notification objects based on the selected escalation policy.
-
Enable manual recovery: If enabled, an alert is not automatically cleared even if no new alert events are triggered within the auto-recovery period defined in the alert integration. You must manually update the alert status.
-
-
In the Action Integration section, you can configure actions that run automatically when an alert is triggered or cleared. For more information, see Execute an alert playbook by using action integrations.
-
After you complete the configuration, click Save.
Manage notification policies
After a notification policy is created, it is displayed on the Notification Policies page. On the Notification Policies page, you can perform the following operations:
-
Edit a notification policy: Click the policy name, or find the policy in the list and click Edit in the Actions column. After making your changes, click Save.
-
Enable or disable a notification policy: Toggle the switch in the policy's Status column.
-
Delete a notification policy: Click Delete in the policy's Actions column, and then click Confirm in the confirmation dialog box that appears.
-
Copy a notification policy: Click Copy in the policy's Actions column to create a duplicate.