Skip to content

Interval Detection V2


Document Scope

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

Data scope: Metrics (M), APM (T), RUM (R)

Interval Detection V2 uses historical data to build confidence intervals and predict the normal fluctuation range. The system compares current data characteristics with historical data and determines whether they exceed the confidence interval, thereby identifying anomalies and triggering alerts to ensure data stability and security.

Key features:

  • In-depth analysis: builds confidence intervals based on historical data to predict normal fluctuations;
  • Continuous updates: continuously updated by the TrueWatch algorithm team to improve data processing capabilities.

Concepts

Confidence Interval Range (confidence_interval): A metric that measures the tolerance for fluctuations in time series data within a specific detection range, with values between 1% and 100%.

  • When data is highly volatile and random, increase this value appropriately;
  • When data fluctuates regularly, decrease this value.

If:

  • If the confidence interval is too large, the upper and lower boundaries widen, reducing the number of detected anomalies;
  • If the confidence interval is too small, too many anomalies may be detected;
  • If the confidence interval is too large, it may fail to detect any anomalies.

Therefore, adjusting this parameter appropriately based on data fluctuation characteristics is critical to balancing the sensitivity and accuracy of anomaly detection, effectively avoiding excessive false positives or missed anomalies.

Detection Configuration

Detection Frequency

Set the time interval for executing detection.

  • Fixed frequency: 10 minutes (not changeable)

Detection Metrics

Define the detection data source and aggregation method based on DQL.

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.
Data Type The data type for the current detection, including Metrics, APM (Tracing), and RUM (user access data).
Measurement The measurement containing the current detection metric.
Metric The metric targeted by the current detection.
Aggregation Algorithm Supports 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), p75 (75th percentile), p90 (90th percentile), and p99 (99th percentile).
Detection Dimensions Any corresponding string (keyword) field in the configuration data can be selected as a detection dimension. Currently, up to three fields can be selected. A combination of multiple detection dimension fields can identify a specific detection object (for example, {host: host1, host_ip: 127.0.0.1}).
Filter Conditions Filter detection data based on metric tags to limit the detection scope. Supports adding one or more tag filters, as well as fuzzy match and fuzzy non-match filter conditions.
Alias Custom name for the detection metric.
Query Method Supports simple queries and expression queries.

Trigger Conditions

Configure trigger conditions for each alert level (Critical, Severe, Important, Warning) and the normal recovery condition.

Configuration Item Description
Change Direction Select the data anomaly direction:

  • Up or down: triggers when data increases or decreases
  • Up: triggers only when data increases
  • Down: triggers only when data decreases
  • Confidence Interval Bounds Set the confidence interval width (1-100%). This is the width of the predicted confidence interval range. For metrics with relatively large fluctuations, you can appropriately increase the confidence interval width to avoid false positives.
    Critical/Severe/Important/Warning Triggers when Result >= [value]%. Compares the proportion of data points with sudden anomalies; if it is outside the configured range, an event is triggered.
    Normal No event is generated for [N] detections. After the detection rule takes effect, if the data detection result recovers from abnormal to normal within the configured custom detection count, a recovery alert event is triggered.

    High-Volume Alert Protection

    Enabled by default. When the number of alerts generated by a single detection exceeds the preset threshold (100), the system automatically enables the status-based aggregation policy, suspends the per-object aggregation and mute process, and generates and pushes summary events by status. This ensures notification timeliness while significantly reducing noise and avoiding processing timeout risks. When this switch is enabled, such event details generated after the monitor subsequently detects an anomaly will not display history or related events.

    Note

    Recovery alert events are not subject to Alert Mute. If the detection count for recovery alert events is not set, alert events will not recover and will remain in Events > Unrecovered Events.

    Data Gap

    Handling policy when the query result for the detection metric is empty within the detection interval:

    Option Description
    Do not trigger events Does not trigger events when there is no data; suitable for scenarios where data absence is allowed.
    Treat query result as 0 Treats empty data as 0 and continues to determine whether to generate an anomaly event based on the configured trigger conditions.
    Trigger Data Gap Event For the same object, generates one data gap event per data gap round; after recovery, a new data gap event can be generated if a data gap occurs again.
    Continuously Trigger Data Gap Events When the same object continuously meets the data gap condition, generates data gap events at the detection frequency until data recovers. For configuration, see Data Gap.
    Trigger Critical Event Triggers a Critical-level event when there is no data.
    Trigger Severe Event Triggers a Severe-level event when there is no data.
    Trigger Important Event Triggers an Important-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 an event-triggering action, enter the data gap duration. It is recommended to set it to ≥ 2 times the detection frequency.

    Info Event Generation

    When this option is enabled, the system writes all detection results that do not match the above trigger conditions as "Info" events.

    When trigger conditions, data gaps, and info event generation are configured at the same time, the trigger priority is as follows: Data Gap > Trigger Conditions > Info Event Generation.

    Subsequent Configuration

    After completing the above detection configuration, continue with the following:

    1. Event Notification: Define the event title, content, notification members, data gap handling, and related incidents;
    2. Alert Configuration: Select an alert policy, and set notification targets and mute periods;
    3. Associations: Associate dashboards for quick navigation to view data;
    4. Permissions: Set operation permissions to control who can edit/delete this monitor.