All Products
Search
Document Center

Managed Service for Prometheus:Discard metrics

Last Updated:Jul 09, 2024

This topic describes how to view the amount of reported metric data to evaluate the efficiency of data collection and the monitoring scope, and discard useless metrics to prevent resource waste.

Prerequisites

A Prometheus instance is created. For more information, see the following topics:

Note

The metrics of a general-purpose Prometheus instance can be viewed and cannot be discarded. You can click Metric Management in the left-side navigation pane of the instance details page to view the metric details.

View metrics

  1. Log on to the Managed Service for Prometheus console.

  2. In the left-side navigation pane, click Instances.

  3. Click the name of the Prometheus instance.

  4. In the left-side navigation pane, click Service Discovery. On the Metrics tab, you can view parameters, such as Metric Name, Job Name, Metric Type, Proportion, and Metric Quantity in Last 10 Minutes.

    You can query metrics by job name or metric type. You can also enter a keyword in the search box to perform fuzzy matching.

    Parameter

    Description

    Metric Name

    The name of the metric.

    Job Name

    The name of the job that collects the metric.

    Metric Type

    • Basic Metrics

    • Custom Metrics

    Proportion

    The percentage of data reported for the metric in the total number of metric data.

    Metric Quantity in Last 10 Minutes

    The number of data reported for the metric and stored in the last 10 minutes.

Discard metrics

If you no longer want your Prometheus instance to monitor some metrics, you can discard these metrics. You are not charged for discarded metrics.

Important

You cannot discard the basic metrics about ACK clusters.

  1. Log on to the Managed Service for Prometheus console. On the Instances page, click the name of the Prometheus instance.

  2. In the left-side navigation pane, click Service Discovery. On the Metrics tab, discard metrics.

    • Discard one metric

      1. Find the metric that you want to discard and click Discard in the Actions column.

      2. In the message that appears, click OK.

    • Discard multiple metrics

      1. In the upper-right corner of the page, click Manage Discarded Metrics.

      2. In the dialog box that appears, enter the names of the metrics that you want to discard and click OK.

        image.png

        Important

        Separate metric names with line breaks. Commas, semicolons, colons, or spaces are not supported.

    • Discard all metrics

      1. In the lower-left corner of the page, click Discard All.

      2. In the message that appears, click OK.

Enable discarded metrics

If you want to monitor discarded metrics, you can enable them. You are charged for the enabled metrics.

  1. Log on to the Managed Service for Prometheus console. On the Instances page, click the name of the Prometheus instance.

  2. In the left-side navigation pane, click Service Discovery. On the Metrics tab, enable the discarded metrics.

    • Enable one discarded metric

      1. Find the discarded metric that you want to enable and click Enable in the Actions column.

      2. In the message that appears, click OK.

    • Enable multiple discarded metrics

      1. In the upper-right corner of the page, click Manage Discarded Metrics.

      2. In the dialog box that appears, delete the name of the discarded metrics that you want to enable and click OK.