Synthetic monitoring tasks collect availability and performance data, but without alert rules, you must manually watch for failures. Alert rules define threshold conditions that automatically generate alert events when metrics cross specified values. Pair alert rules with notification policies to route alerts to your preferred channels: SMS, email, phone, DingTalk chatbots, WeCom chatbots, or webhooks.
Prerequisites
Before you begin, make sure that you have:
An Alibaba Cloud account with Application Real-Time Monitoring Service (ARMS) activated
At least one synthetic monitoring task created under Synthetic Monitoring > Scheduled Tests
An alert contact group configured with the recipients who should receive notifications. See Notification objects
Create an alert rule
Log on to the ARMS console.
In the left-side navigation pane, choose Synthetic Monitoring > Scheduled Tests.
On the Synthetic Tasks page, find the target task and click Alert in the Actions column.
In the Alarm rules for the cloud test task panel, click Create alarm rules.
In the Create Cloud Dial Test Alarm panel, configure the following parameters.
Alert identity
| Parameter | Description |
|---|---|
| Alert Rule Name | The name of the alert rule. |
| Task ID | Auto-populated with the current synthetic monitoring task ID. |
Metric and conditions
| Parameter | Description |
|---|---|
| Alert Contact Group | The alert contact group. Select an alert contact group from the drop-down list. Available groups vary by task type. |
| Alert Metric | The metric to monitor. Available metrics vary by alert group. |
| Alert Condition | The threshold condition that triggers an alert event. |
Filter conditions
Filter conditions control which resources the alert rule applies to. A resource generates an alert event only when it matches both the filter condition and the alert condition.
| Filter type | Behavior |
|---|---|
| Traverse (default) | Applies to all resources in the task. |
| Equal To | Applies to a single specified resource. Enter the exact resource name. You cannot specify multiple resources. |
| Not Equal To | Applies to all resources except the specified one. Enter the exact resource name. You cannot specify multiple resources. |
| Regex match | Applies to all resources whose names match the regular expression. |
| Regex not match | Applies to all resources whose names do not match the regular expression. |
After you set the filter conditions, the Data Preview section displays the configured metric values as time series curves.
Duration and severity
| Parameter | Description |
|---|---|
| Duration | Controls when an alert event is generated after the threshold is crossed. Two options: (1) Generate immediately when a single data point meets the condition. (2) Generate only after the condition persists continuously for N minutes. A longer duration reduces false positives from transient spikes. |
| Alert Level | The severity of the alert event. Values in ascending severity order: Default, P4, P3, P2, P1. |
Alert message
| Parameter | Description |
|---|---|
| Alert Message | The notification content sent to recipients. Customize variables using Go template syntax. |
Notification delivery
Choose one of two notification modes:
Simple mode -- Configure notifications directly within the alert rule:
| Parameter | Description |
|---|---|
| Notification Objects | The contacts or contact groups to notify. See Notification objects. |
| Notification Period | The time window during which notifications are sent. |
| Whether to Resend Notifications | Whether to send repeated notifications if the alert persists. |
Standard mode -- Route notifications through a notification policy for centralized management:
| Option | Behavior |
|---|---|
| Select a notification policy | Choose an existing policy from the drop-down list. A match rule is automatically added to the selected policy with the alert rule ID as the match condition. Alert events from this rule are then routed through that policy. |
| Do Not Specify Notification Policy | Skip policy selection now and create one later on the Notification Policy page. When creating the policy, set Data Source to ARMS - Synthetic Monitoring to match only synthetic monitoring alerts. See Create and manage a notification policy. |
Other notification policies that use fuzzy matching may also match alert events from this rule. This can result in duplicate notifications from multiple policies matching the same event.
Advanced settings
| Parameter | Description |
|---|---|
| Alert Check Cycle | How often (in minutes) the alert condition is evaluated. Default: 1. Minimum: 1. |
| Tags | Specify tags for the alert rule. The specified tags can be used to match notification policies. |
| Annotations | Additional metadata for the alert rule. |
Click Completed.
The new alert rule appears in the Alarm rules for the cloud test task panel.
Manage alert rules
In the Alarm rules for the cloud test task panel, use the options in the Actions column:
| Action | Steps |
|---|---|
| Edit | Click Edit, modify the parameters in the Edit Cloud Dial Test Alarm panel, then click Completed. |
| Delete | Click Delete, then click OK to confirm. |
| Enable | Click Start, then click OK to confirm. |
| Disable | Click Stop, then click OK to confirm. |
What's next
View alert events: In the left-side navigation pane, choose Alert Management > Alert Event History to review triggered alert events. See View historical alert events.
Handle alerts: In the left-side navigation pane, choose Alert Management > Alert Sending History to claim, clear, block, or reassign alerts. See View historical alerts.