Last update:2026-08-20 15:59:54
Reading time: About 8 minutes
You can configure custom alert rules based on your business needs. This document walks you through configuring a custom alert rule.
Path: Analysis & Logs > Alert Management > Alert Rules > Add Alert Rule
Configure the Alert Level: Sets the level assigned when the alert is triggered, which determines the alert’s handling priority. Available levels are Emergency, Major, and Warning. We recommend choosing based on business impact: select Emergency when core business is affected and requires immediate action; select Major when the issue needs close attention but the impact is manageable; select Warning when you only need to be aware of the issue and no immediate action is required.
Select the Monitoring Object:
Note: For L7 Protection, only hostnames that already have security protection enabled are available for selection.
Configure the Statistics Method:
Configure the Trigger Condition:
An alert trigger condition consists of three parts: Statistical Period + Statistical Metric + Threshold.
Statistical Period
A statistical period consists of: Statistical Granularity + Number of Consecutive Data Points.
For example, if you select a 1-minute granularity with 3 consecutive data points, the system checks the metric once every minute; if all 3 checks reach the configured threshold for the statistical metric, the alert is triggered.
| Configuration Item | Available Options |
|---|---|
| N-Minute Statistical Granularity | 1 minute, 2 minutes, 5 minutes, 10 minutes |
| N Consecutive Data Points | 1, 2, 3, 4, 5 |
The alert resolution condition is also determined by the Statistical Period: if the trigger condition is not met for N consecutive periods, the alert is resolved.
Statistical Metric
A statistical metric defines the monitoring expression to be calculated. A statistical metric consists of a Basic Metric + Filter Condition; together they narrow the metric down to the data that matches the filter condition for statistics.
| Monitoring Object | Configuration Item | Available Options | Metric Calculation Logic Example |
|---|---|---|---|
| L7 Protection | Basic Metric | Requests QPS Back-to-Origin Requests Back-to-Origin QPS |
Basic Metric: Requests Filter Fields: 1. WAF - Rule Type = XSS, SQL; 2. Final Security Action = Deny This calculates: The number of requests where the Final Security Action equals Deny and the triggered WAF Rule Type equals XSS or SQL Note: Select filter fields for security features that are already enabled, to ensure the system can monitor the relevant data and send alerts. |
| Filter Condition | Policy: Policy Type, Final Security Action Request: Path, Request Method, Status Code DDoS Protection: Policy Name WAF: Rule Type |
||
| L4 Protection | Basic Metric | Peak Attack Bandwidth | Basic Metric: Peak DDoS Attack Bandwidth Filter Field: DDoS Attack Type = SYN, ACK This calculates: The sum of the peak attack bandwidth for SYN Flood and ACK Flood |
| Filter Condition | CPS Blackhole (if any CPS IP within the resource group is blackholed, the alert is triggered; when the blackhole is lifted, the alert is resolved) |
Threshold Operators
| Operator Type | Operator | Example |
|---|---|---|
| Numeric Comparison | > , >= | Example: Requests > 100 |
| <,<= | Example: Requests < 100 | |
| =, != | Example: Requests = 100 | |
| Cross-period Fluctuation | Up from yesterday, Down from yesterday | Example: Back-to-Origin Requests increased day-over-day by 30% compared to yesterday Day-over-Day Calculation Rules |
| Ratio Calculation | Proportion ≥, Proportion < | Example: Back-to-Origin 5xx Error Requests as a percentage ≥ 20% Basic Metric: Back-to-Origin Requests as a percentage ≥ 20% Filter Condition: Status Code equals 5xx Note: For percentage calculations, you must add a filter condition, which is used to calculate the percentage of matching requests. |
| Configuration Item | Available Options |
|---|---|
| Alert Every N Minutes | Only alert at first time; every 5, 10, 15, or 30 minutes; or once every 1/2/6/12/24 hours |
| Alert Cleared Notification | Yes / No |
For example, if an alert lasts 12 minutes and you configure it to alert once every 5 minutes with alert cleared notifications enabled, the first notification is sent when the alert triggers, a second is sent 5 minutes later, a third 10 minutes later, and a recovery notification is pushed when the alert resolves at 12 minutes.
Configure the time window during which you receive alert notifications. Outside this window, alerts are still logged in the alert history, but no notifications are sent.
Note: If the start time is later than the end time, the window spans midnight. For example, configuring
23:00-02:00means notifications are sent from 23:00 the same day to 02:00 the next day.
Select the Notification Language: Simplified Chinese or English.
Configure the Notification Method:
When a new type of L7 DDoS attack occurs, AI Intelligent Protection identifies the threat based on learned attack signatures and deploys an AI protection rule. Alerts let you know promptly when a rule is deployed and what action was taken on requests, so you can assess risks such as false positives.
On the Alert Management page, click Add Alert Rule to enter the alert rule configuration page.
Configure Basic Information: Rule Name and Description (optional).
Configuration details:
Configure Alert Notification: Select Yes for Alert Cleared Notification, configure the Notification Period to the default (All-day), Notification Language, and Notification Method.