Threshold Detection¶
Current Document Positioning
This document is the second step in the detection rule configuration process. After configuration, please return to the main document to continue with the third step: Event Notification.
Data range: Supports all data types, such as Metrics M, Logs L, Traces T, RUM data R, Objects O, etc.
Detection Configuration¶
Detection Frequency¶
Sets the time period for executing detection.
-
Preset options: 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour
-
Crontab mode: Click "Switch to Crontab mode" to configure custom periods, supporting scheduled tasks based on seconds, minutes, hours, days, months, weeks, etc.
Detection Interval¶
Sets the data time range for each detection query (❗️The detection interval should be greater than or equal to the detection frequency, and must match the actual data reporting period to avoid missed or false alarms).
- Preset options:
| Detection Frequency | Detection Interval (Dropdown Options) |
|---|---|
| 30s | 1m/5m/15m/30m/1h/3h |
| 1m | 1m/5m/15m/30m/1h/3h |
| 5m | 5m/15m/30m/1h/3h |
| 15m | 15m/30m/1h/3h/6h |
| 30m | 30m/1h/3h/6h |
| 1h | 1h/3h/6h/12h/24h |
| 6h | 6h/12h/24h |
| 12h | 12h/24h |
| 24h | 24h |
- Custom format: Custom input detection interval, e.g., 20m (last 20 minutes), 2h (last 2 hours), 1d (last 1 day).
Detection Metrics¶
Defines the detection data source and aggregation method based on DQL.
Avoid selecting high-cardinality fields as detection dimensions. Improper configuration with overly lenient trigger conditions may cause frequent alerts. The current query returns a maximum of 100,000 records.
Configuration example: When configuring detection metrics for a monitor, trace_id was selected as the grouping field.
The system will then prompt you:
The current grouping field trace_id is a high-cardinality risk field. Using such fields for aggregation will generate a massive number of groups, which can easily lead to an alert explosion and cause the monitor to be automatically suspended by the system. Please optimize the grouping settings.
Configuration Elements¶
| Configuration Item | Description |
|---|---|
| Workspace | Default is the current workspace, can be switched to other authorized workspaces After authorization, you can use detection metrics from other workspaces under the current account to create monitors. Once the rule is created successfully, cross-workspace alert configuration is achieved. Note that when you select another workspace, the detection metrics dropdown will only display the data types that have been authorized for use in the current workspace. |
| Data Source Type | Metrics, Logs, Traces, RUM data, etc. |
| Query Method | Simple Query, Expression Query, PromQL Query, Data Source Query |
| Filter Conditions | Filter detection objects by tags |
| Aggregation Method | avg, sum, max, min, count, etc. |
| Function Support | Click the fx button to select the following functions: ❗️When using conversion functions derivative, difference, non_negative_derivative, non_negative_difference, you need to add interval. For example: [::5m] |
Click to view Query Method Details, More Function Usage Instructions.
Trigger Conditions¶
Configures trigger conditions and severity levels. When the query result has multiple values, an event is generated if any value meets the trigger condition.
Supports configuring Critical, Error, Warning, Info four-level thresholds, and OK recovery conditions.
| Level | Configuration | Description |
|---|---|---|
| Critical | When Result >= [value] |
Highest level alert, requires immediate action |
| Error | When Result >= [value] |
High level alert, requires priority action |
| Warning | When Result >= [value] |
Medium level alert, requires attention |
| Info | When Result >= [value] |
Low level alert, requires observation |
| OK | No event generated for [N] consecutive detections |
If the detection metric triggered "Critical", "Error", "Warning", or "Info" abnormal events, and then [N] consecutive detections are normal, an "OK" event is generated. Used to determine if the abnormal event has returned to normal, recommended to configure. |
For more details, refer to Event Level Description.
Advanced Options¶
Continuous Trigger Judgment¶
When enabled, events are generated only when the trigger condition is continuously met, avoiding false alarms from transient fluctuations (❗️Maximum configuration limit is 10 times).
Large-Scale 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: Instead of processing each alert object individually, a small number of summary alerts are generated based on event status and pushed.
This ensures timely notifications while significantly reducing alert noise and avoiding timeout risks due to processing too many alerts.
When this switch is enabled, subsequent Event Details generated by the monitor after detecting anomalies will not display historical records or related events.
Recovery Conditions¶
Configures recovery conditions and severity levels. When the query result has multiple values, a recovery event is generated if any value meets the trigger condition.
Set independent recovery thresholds for different levels to achieve downgraded recovery. For example: a Critical alert needs to recover when the value drops below 70, while a Warning alert can recover when below 80.
Recovery Alert Logic¶
When "Recovery Conditions" is enabled, the system uses the Fault ID as a unique identifier to manage the entire lifecycle of the alert (including creating Issues, etc.).
When the graded recovery function is enabled simultaneously:
-
The platform configures a separate set of recovery rules (i.e., recovery thresholds) for each alert level (e.g.,
critical,warning) -
The alert status and recovery status of each level are calculated independently
-
It does not affect the original alert lifecycle identified by the Fault ID
Therefore, when the monitor triggers an alert for the first time (i.e., starts a new alert lifecycle), the system generates two alert messages simultaneously. They appear similar because:
-
The first alert source: Overall detection (
check), representing the start of the entire fault lifecycle (based on the original rule); -
The second alert source: Graded detection (
critical/error/warning/...), indicating that the graded recovery function has been activated, used to present the specific alert level and its subsequent recovery status (e.g.,critical_ok).
In the above, the df_monitor_checker_sub field is the core basis for distinguishing the two types of alerts:
-
check: Represents the result of the overall detection; -
Other values (e.g.,
critical,error,warning, etc.): Correspond to the results of the graded detection rules.
Therefore, when the alert is triggered for the first time, two records appear with similar content but different sources and purposes.
df_monitor_checker_sub |
T+0 | T+1 | T+2 | T+3 |
|---|---|---|---|---|
check |
check |
error |
warning |
ok |
critical |
critical |
critical_ok |
||
error |
error |
error_ok |
||
warning |
warning |
warning_ok |
Data Gap¶
Handling strategy when the query result of the detection metric is empty within the detection interval:
| Option | Description |
|---|---|
| Do not trigger event (default) | No alert generated when no data, suitable for scenarios where data loss is acceptable |
| Treat query result as 0 | Treat empty data as value 0 for threshold judgment |
| Trigger data gap event | Treat no data as anomaly, trigger a data gap event |
| Trigger critical event | Trigger a critical level event when no data |
| Trigger error event | Trigger an error level event when no data |
| Trigger warning event | Trigger a warning level event when no data |
| Trigger info event | Trigger an info level event when no data |
| Trigger recovery event | Trigger a recovery event when no data |
When Trigger Conditions, Data Gap, and Info Generation are configured simultaneously, the priority for judgment is: Data Gap > Trigger Conditions > Info Event Generation.
That is: first determine if there is a data gap, then determine if the threshold is triggered, and finally determine if an info event is generated.
Info Generation¶
When this option is enabled, you need to configure Info Generation Conditions. An "Info" event is written only when the detection result does not trigger any of the "Critical", "Error", "Warning", or "Info" thresholds, and the info generation condition is met.
Suitable for scenarios where normal state changes or low-priority information needs to be recorded.
Subsequent Configuration¶
After completing the above detection configuration, proceed to configure:
-
Event Notification: Define the event title, content, notification members, data gap handling, and associated faults;
-
Alert Configuration: Select alert strategies, set notification targets and mute periods;
-
Association: Associate dashboards for quick navigation to view data;
-
Permissions: Set operation permissions to control who can edit/delete this monitor.

