Managed Service for Prometheus uses an intelligent detection operator to automatically detect abnormal fluctuations in key performance indicator (KPI) time series data. This feature performs anomaly detection on time series and helps you make decisions for subsequent actions, such as alerting, automatic damage control, and root cause analysis. This topic describes how to use the intelligent detection operator to detect abnormal data fluctuations.
Limits
This feature is not supported for v2 instances.
Find abnormal data fluctuations in a Prometheus instance
Log on to the Managed Service for Prometheus console.
In the left navigation pane, click Instances.
Click Grafana Workspace for the target instance.
In the navigation pane on the left, click the
(Explore) icon. Then, in the upper-left corner, select a data source from the drop-down list to the right of Explore.
In the text box to the right of Metrics browser, enter the following sample Prometheus Query Language (PromQL) statement. This anomaly detection operator detects abnormal data fluctuations for the current metric over specific periods.
anomaly_detect(arms_cms_collector_duration_seconds[180m], 3)
Notearms_cms_collector_duration_seconds is the name of the target metric. Replace it as needed.
The PromQL query must return a range vector. To do this, add a range selection such as [180m] after the metric name. The default range selection is [180m] and the default parameter is 3. If you have already applied other aggregate functions, change the range selection to [180m:] to ensure that the data type is a range vector. For example: anomaly_detect(sum(node_memory_free_bytes)[180m:], 3).