You can separately configure the features of generating and collecting the metrics of a Service Mesh (ASM) gateway based on your business requirements. If you enable the feature of generating the metrics of an ASM gateway, the gateway itself generates the corresponding metrics. You can customize the metrics that are generated by the gateway. If you enable the feature of collecting the metrics of an ASM gateway, the generated metrics are collected to Managed Service for Prometheus, which allows you to store and analyze metrics and visualize the query and analysis results on charts. This topic describes how to configure the features of generating and collecting the metrics of an ASM gateway and view the metrics.
Prerequisites
Managed Service for Prometheus is activated for your Alibaba Cloud account. For more information, see Activate ARMS.
ImportantYou may be charged for collecting metrics to Managed Service for Prometheus. For more information about the billing of the service, see Billing overview.
The Prometheus agent is installed in the Container Service for Kubernetes (ACK) cluster. For more information, see Create a Prometheus instance to monitor an ACK cluster.
Step 1: Enable the feature of generating metrics
For more information, see Customize metrics in ASM.
Step 2: Enable the feature of collecting metrics and view the metrics
Enable the feature of collecting metrics. For more information, see Collect metrics to Managed Service for Prometheus.
View metrics.
Log on to the ASM console. In the left-side navigation pane, choose .
On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose or .
In the Observability section of the desired gateway, click Gateway monitoring to view the metrics.
The example in the following figure shows the monitoring of the ingress gateway.