All Products
Search
Document Center

:Configure metrics

Last Updated:Apr 16, 2024

This topic describes how to view the metrics of a Prometheus instance and how to discard metrics. In this example, a Prometheus instance for Container Service is used.

View the metrics of a Prometheus instance for Container Service

Note
  • You cannot view the metrics of a global aggregation instance.
  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.
  5. On the page that appears, click the Metrics tab.
    On the Metrics tab, the metric names, percentages, and numbers of data samples in the last 10 minutes are displayed in a table.

    You can filter metrics by job name or metric type. You can also enter a keyword in the search column to perform fuzzy match.

    ParameterDescription
    MetricsThe name of the metric.
    Job NameThe name of the job that collects the metric.
    Metric Type
    • Basic metric
    • Custom metric
    PercentageThe percentage of the data samples on the metric in the total number of data samples.
    Metric Quantity in Last 10 MinutesThe number of data samples that are stored in the last 10 minutes.

Discard metrics

If you no longer want your Prometheus instance to monitor the data of some custom metrics, you can discard these custom metrics to prevent unnecessary costs. You are not charged for deprecated custom metrics.

Note You cannot discard metrics for a global aggregation instance or aPrometheus instance for cloud services.
  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.
  5. On the page that appears, click the Metrics tab. Perform the following operations to discard custom metrics based on your business requirements.
    • To discard one custom metric, perform the following steps:
      1. Find the custom metric that you want to discard and click Discard in the Actions column.
      2. In the Configure Discarded Metrics message, click OK.
    • To discard multiple custom metrics, perform the following steps:
      1. In the upper-right corner of the page, click Configure Discarded Metrics.
      2. In the Configure Discarded Metrics dialog box, enter the names of the metrics that you want to discard and click OK.
    • Discard all custom 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 use a Prometheus instance to monitor discarded metrics, you can enable these discarded metrics. You will be charged for the discarded custom metrics that you enable.

  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.
  5. On the page that appears, click the Metrics tab. Perform the following operations to enable discarded metrics based on your business requirements.
    • Enable a single 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 at a time
      1. In the upper-right corner of the Metrics tab, click Configure Discarded Metrics.
      2. In the message that appears, delete the names of the discarded metrics that you want to enable and click OK.