All Products
Search
Document Center

Managed Service for Prometheus:Discard metrics

Last Updated:Dec 13, 2024

By viewing the amount of metric data reported by your Prometheus instances, you can evaluate the monitoring scope and real-timeness of the data, and discard unnecessary metrics to avoid resource waste.

Limits

The following metrics cannot be discarded:

  • Basic metrics about Container Service for Kubernetes (ACK) clusters.

  • Metrics that are directly reported by using Pushgateway, RemoteWrite, or the OpenTelemetry protocol.

  • Metrics that are reported after the metric convergence feature is enabled. For example, the feature is available in Alibaba Cloud Service Mesh (ASM) Premium Edition.

  • Metrics of a general-purpose Prometheus instance. You can click Metric Management in the left-side navigation pane of the instance details page to view the metric details.

Prerequisites

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

View metrics

  1. Log on to the Prometheus console. In the left-side navigation pane, click Instances.

  2. Click the name of the Prometheus instance.

  3. 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

    The options are as follows:

    • Basic Metrics

    • Custom Metrics

    Proportion

    The percentage of data reported for the metric among all the 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 need your Prometheus instance to monitor some metrics, you can discard them. You are not charged for discarded metrics. To do so, take the following steps:

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.

  2. On the Integrated Environments tab, click the name of the environment that you want to manage.

  3. On the page that appears, click the Metric Scraping tab, then click Discard Metrics. Next, configure the metrics that you want to discard in the text box, and click Update.

    Note

    You can separate metric names with line breaks. Commas, semicolons, colons, and spaces are not supported.

    70.png

Remove discarded metrics

Important

After you remove the discarded metrics, the metrics are no longer in the discarded state. They can be reused, and will incur fees.

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.

  2. On the Integrated Environments tab, click the name of the environment that you want to manage.

  3. On the page that appears, click the Metric Scraping tab, then click Discard Metrics. Next, delete the discarded metrics in the text box, and click Update.