Skip to content

Range Detection


Current Document Scope

This document is the second step in the detection rule configuration process. After configuration is complete, return to the main document Continue to Step 3: Event Notification.

Within the selected time range, the system performs anomaly detection on metric data. If the proportion of sudden change anomalies among the detected data points exceeds the preset threshold percentage, a range anomaly event is triggered.

This is suitable for monitoring data/metrics with stable trends. For example, when detecting that the proportion of data points with sudden change anomalies in Host CPU usage over the last 1 day exceeds 10%, an anomaly event is generated.

Detection Configuration

Detection Frequency

Set the time period for running detection. It automatically matches the selected detection interval.

Detection Interval (drop-down options) Detection Frequency
15m 5m
30m 5m
1h 15m
4h 30m
12h 1h
1d 1h

Detection Interval

Set the data time range queried by each detection (❗️The detection interval should be greater than or equal to the detection frequency and must match the actual data reporting period to avoid missed detections or false positives).

  • Preset options: Last 15 minutes, Last 30 minutes, Last 1 hour, Last 4 hours, Last 12 hours, Last 1 day

  • Custom format: Enter a custom detection interval, for example: 20m (last 20 minutes), 2h (last 2 hours), 1d (last 1 day).

Detection Metric

Define the detection data source and aggregation method based on DQL (❗️Avoid selecting high-cardinality fields as detection dimensions. Improper configuration may make trigger conditions too loose and cause frequent alerts. The maximum number of records returned by the current query is 100,000).

Configuration Elements

Configuration Item Description
Workspace Defaults to the current workspace; you can switch to another authorized workspace.

After authorization, you can use detection metrics from other workspaces under the current account to create monitors. Once the rule is created, you can implement cross-workspace alert configuration. Note that when you select another workspace, the detection metric drop-down list displays only the data types authorized for use in the current workspace.
Data Source Type Metrics, Logs, Infrastructure, Resource Catalog, Events, Application Performance Monitoring (APM), Real User Monitoring (RUM), Network, Profile, etc.
Query Method Simple Query, Expression Query
Detection Dimension Any string (keyword) field in the data can be selected as a detection dimension. Currently, up to three fields can be selected as detection dimensions. By combining multiple detection dimension fields, you can determine a specific detection object. The system determines whether the statistical metric corresponding to the detection object meets the trigger condition threshold and generates an event if the condition is met.

(For example, if you select the detection dimensions host and host_ip, the detection object can be {host: host1, host_ip: 127.0.0.1}).
Filter Conditions Filter the detection metric data based on metric tags to limit the data range for detection; supports adding one or more tag filters; supports fuzzy match and fuzzy non-match filter conditions
Aggregation Method Avg by (average), Min by (minimum), Max by (maximum), Sum by (sum), Last (last value), First by (first value), Count by (number of data points), Count_distinct by (number of distinct data points), p50 (median value), p75 (value at the 75th percentile), p90 (value at the 90th percentile), p99 (value at the 99th percentile), etc.
Alias Custom name for the detection metric

Click to view Query Method Details.

Trigger Conditions

Configure trigger conditions and severity. When the query result contains multiple values, an event is generated if any value meets the trigger condition.

Supports configuring four levels of thresholds—Critical, Major, Minor, Warning—and a Normal recovery condition.

Level Configuration Description
Critical When the change direction is Up or Down/Up/Down, Result >= [value] % Compares the proportion of data points with sudden change anomalies; triggers an event if the result is outside the configured range
Major When the change direction is Up or Down/Up/Down, Result >= [value] % Compares the proportion of data points with sudden change anomalies; triggers an event if the result is outside the configured range
Minor When the change direction is Up or Down/Up/Down, Result >= [value] % Compares the proportion of data points with sudden change anomalies; triggers an event if the result is outside the configured range
Warning When the change direction is Up or Down/Up/Down, Result >= [value] % Compares the proportion of data points with sudden change anomalies; triggers an event if the result is outside the configured range
Normal No event is generated for [N] detections After the detection rule takes effect, if the data detection result recovers from abnormal (Critical, Major, Minor, Warning) to normal within the configured custom detection count, a recovery alert event is triggered.
❗️Recovery alert events are not subject to Alert Mute. If the detection count for recovery alert events is not set, the alert event will not recover and will remain in Events > Unrecovered Events

For more details, see Event Severity Levels.

High-Volume Alert Protection

Enabled by default.

When the number of alerts generated by a single detection exceeds the preset threshold, the system automatically switches to a status-based aggregation strategy: it no longer processes alert objects one by one, but generates and sends a small number of summary alerts based on event status.

This ensures timely notifications while significantly reducing alert noise and avoiding timeout risks caused by processing too many alerts.

When this switch is enabled, such Event Details generated after the monitor detects an anomaly will not display history or related events.

No Data

Processing strategy when the query result for the detection metric is empty within the detection interval:

Option Description
Do not trigger an event (default) No event is triggered when there is no data. This is suitable for scenarios where data gaps are allowed.
Treat query results as 0 Treat empty data as 0 and continue to determine whether to generate an anomaly event according to the configured trigger conditions.
Trigger No Data event Generates one No Data event per round of no data for the same object. If the object recovers and then has no data again, a new event can be generated.
Continuously trigger No Data events When the same object continuously meets the no-data condition, generates No Data events at the detection frequency until data recovers. For configuration, see No Data.
Trigger Critical event Triggers a Critical-level event when there is no data.
Trigger Major event Triggers a Major-level event when there is no data.
Trigger Minor event Triggers a Minor-level event when there is no data.
Trigger Warning event Triggers a Warning-level event when there is no data.
Trigger recovery event Triggers a recovery event when there is no data.

After selecting the action for triggering an event, enter the no-data duration. It is recommended to set it to ≥ the detection interval. When no-data conditions and anomaly conditions are met at the same time, the system applies the no-data handling result first.

When Trigger Conditions, No Data, and Info Event Generation are configured at the same time, the trigger is determined according to the following priority: No Data > Trigger Conditions > Info Event Generation.

That is, first determine whether no data occurs, then determine whether a threshold is triggered, and finally determine whether to generate an info event.

Info Event Generation

After enabling this option, you must configure Info Event Generation Conditions. The system writes an "Info" event only when the detection result does not trigger any of the "Critical", "Major", "Minor", or "Warning" thresholds and meets the Info Event Generation Conditions.

Suitable for scenarios where you need to record normal status changes or low-priority information.

Next Configuration

After completing the above detection configuration, continue to configure:

  1. Event Notification: Define the event title, content, notification members, No Data handling, and related incidents;

  2. Alert Configuration: Select an Alert Policy and set Notification Targets and the mute period;

  3. Associations: Associate dashboards for quick access to view data;

  4. Permissions: Set operation permissions to control who can edit or delete this monitor.