Updated on 2024-08-05 GMT+08:00

Configuring Metrics

You can view the metrics of a default Prometheus instance, or a Prometheus instance for CCE or cloud services, and add or discard metrics.

Prerequisites

Precautions

  • Only the default Prometheus instance, and Prometheus instance for CCE or cloud services support the functions of viewing, adding, and discarding metrics.
  • Default Prometheus instance: Metrics whose names start with aom_ or apm_ and resource type is ICAgent cannot be discarded.
  • Prometheus instances for CCE:
    Only the metrics reported by kube-prometheus-stack 3.9.0 or later installed on CCE Add-ons or AOM Integration Center can be discarded. Ensure that this add-on is running when discarding metrics.

    To view the kube-prometheus-stack status, log in to the CCE console and access the cluster page, choose Add-ons in the navigation pane, and locate that add-on on the right.

Viewing the Metrics of a Prometheus Instance of CCE

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Metric Analysis > Prometheus Monitoring.
  3. In the instance list, click a Prometheus instance for CCE.
  4. In the navigation pane on the left, choose Service Discovery. On the Metrics tab page, view the metric names and types of the current Prometheus instance.

    You can also filter metrics by cluster name, job name, or metric type, or enter a metric name keyword to search.

    Table 1 Metric parameters

    Parameter

    Description

    Metric Name

    Name of a metric.

    Metric Type

    Type of a metric. Options: Basic metric and Custom metric.

    Metrics in Last 10 Min

    Number of metrics that are stored in the last 10 minutes.

    Proportion

    Number of a certain type of metrics/Total number of metrics

Viewing the Metrics of a Prometheus Instance of Cloud Services

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Metric Analysis > Prometheus Monitoring.
  3. In the instance list, click a Prometheus instance for cloud services.
  4. In the navigation pane on the left, choose Service Discovery. Then view the metric names and types of the current Prometheus instance.

    You can also filter metrics by metric or resource type, or enter a metric name keyword to search.
    Table 2 Metric parameters

    Parameter

    Description

    Metric Name

    Name of a metric.

    Metric Type

    Type of a metric. Options: Basic metric and Custom metric.

    Resource Type

    Type of a resource.

    That is, the type of the connected cloud service.

Viewing the Metrics of a Default Prometheus Instance

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Metric Analysis > Prometheus Monitoring.
  3. In the instance list, click a default Prometheus instance.
  4. In the navigation pane on the left, choose Service Discovery. Then view the metric names and types of the current Prometheus instance.

    You can also filter metrics by metric or resource type, or enter a metric name keyword to search.
    Table 3 Metric parameters

    Parameter

    Description

    Metric Name

    Name of a metric.

    Metric Type

    Type of a metric. Options: Basic metric and Custom metric.

    Resource Type

    Type of a resource.

    Metrics in Last 10 Min

    Number of metrics that are stored in the last 10 minutes.

    Proportion

    Number of a certain type of metrics/Total number of metrics

More Operations

You can also perform the operations listed in Table 4 if needed.

Table 4 Related operations

Operation

Description

Sorting metrics

Click next to the Metrics in Last 10 Min or Proportion column to change the orders of metrics in the list. indicates the default order. indicates the ascending order (that is, the largest value is displayed at the bottom). indicates the descending order (that is, the smallest value is displayed at the bottom).

Adding metrics

Click Add Metric, select desired metrics from the metric list, and click OK.

NOTE:

A maximum of 100 metrics can be added each time.

Discarding metrics

  • To discard a metric, locate it and click in the Operation column.
  • To discard one or more metrics, select them and click Discard in the displayed dialog box.
    NOTE:

    A maximum of 100 metrics can be discarded each time.