All Products
Search
Document Center

Alibaba Cloud Service Mesh:Generate and collect ASM gateway metrics

Last Updated:Mar 11, 2026

When traffic flows through Service Mesh (ASM) ingress and egress gateways, you need visibility into request volume, latency, and error rates to detect issues and optimize performance. ASM gateways produce Envoy-based monitoring metrics that you can collect to a monitoring backend for storage, querying, and visualization.

Metrics generation and metrics collection are independent features that you enable separately:

FeatureWhat it doesWhen to use
Metrics generationThe gateway produces metrics locally. You choose which metrics to generate and customize them.Always required. Without generation, no metrics exist.
Metrics collectionGenerated metrics are scraped by the Prometheus agent and sent to Managed Service for Prometheus.Enable when you need centralized storage, dashboards, or alerting.

You can enable generation without collection if you only need local observability through the gateway's metrics endpoint. Enable both to build dashboards and alerts in Managed Service for Prometheus.

Prerequisites

Before you begin, make sure that you have:

Important

Collecting metrics to Managed Service for Prometheus may incur charges. For billing details, see Billing overview.

Enable metrics generation

Configure which metrics the ASM gateway generates and customize them to match your observability requirements.

For detailed configuration steps, see Customize metrics in ASM.

Collect metrics to Managed Service for Prometheus

After enabling metrics generation, set up the Prometheus agent to scrape metrics from the ASM gateway and send them to Managed Service for Prometheus for centralized storage and querying.

For detailed configuration steps, see Collect metrics to Managed Service for Prometheus.

View gateway metrics in the ASM console

After both generation and collection are enabled, view the metrics in the ASM console:

  1. Log on to the ASM console.

  2. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  3. On the Mesh Management page, click the name of the ASM instance.

  4. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway or ASM Gateways > Egress Gateway.

  5. In the Observability section of the gateway, click Gateway monitoring.

The following figure shows sample monitoring data for an ingress gateway.

Ingress gateway monitoring dashboard

Related topics