Prometheus Service uses an intelligent detector to identify abnormal fluctuations of KPI time-series data. This helps you make informative decisions in automatic data loss protection and root cause analysis if alerts occur. This topic describes how to use an intelligent detector to identify abnormal data fluctuations of a Prometheus instance on a Grafana dashboard.

Detect abnormal data fluctuations of a Prometheus instance

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Prometheus Monitoring > Prometheus Instances.
  3. In the upper-left corner of the page, select the region where the Prometheus instance resides and click the dashboard of the Prometheus instance.
  4. In the left-side navigation pane, click the Explore icon. In the upper-left corner of the page, select a data source from the Explore drop-down list.
  5. Select a metric from the Metrics drop-down list to view the time-series data of the metric. For example, you can select the following metric whose data anomalies you want to view:
    arms_cms_collector_duration_seconds
    Normal time-series data
  6. In the text box on the right of the Metrics drop-down list, enter the following PromQL statement. The statement is used as a sample anomaly detector. This way, the abnormal data fluctuations about the metric over a specific period of time can be identified.
    anomal_detect (arms_cms_collector_duration_seconds[180m],3)
    Note
    • arms_cms_collector_duration_seconds: the name of the metric used in the previous step. You can replace it based on your business scenario.
    • The data type of the metric that the PromQL statement queries must be range vector. Therefore, you must append a time selector to the right of the metric name. The default value of the time selector is [180m]. The default value of the parameter is 3. If you execute other aggregate functions in advance, you must modify the time selector to [180m:] in the PromQL statement. This way, you can change the data type of the metric to range vector. For example, you can modify the PromQL statement to anonym_detect (sum(node_memory_free_bytes)[180m:],3).
    Abnormal fluctuations