All Products
Search
Document Center

Application Real-Time Monitoring Service:Default service discovery

Last Updated:Aug 25, 2025

Alibaba Cloud Managed Service for Prometheus includes default service discovery to collect metrics from Container Service for Kubernetes (ACK) clusters using standard Prometheus rules, streamlining cluster O&M and performance analysis.

Before you begin

  • This feature applies only to instances deployed in ACK clusters.

  • Pods with annotations in the arms-prom namespace in ACK clusters automatically collect metrics, regardless of whether this feature is enabled.

Billing

  • Default service discovery provided by Alibaba Cloud Managed Service for Prometheus incurs fees.

  • If your cluster previously used open-source Prometheus with default service discovery configurations, migrating to Managed Service for Prometheus retains these settings, resulting in service discovery costs.

Prerequisite

An ACK cluster is created and connected to Managed Service for Prometheus through the Integration Center.

Important

If your ACK cluster is not connected through the Integration Center, this feature cannot be enabled.

Enable default service discovery

Step 1: Add annotations

  1. Log on to the ACK console.

  2. On the Clusters page, find the cluster and click its name. In the left navigation pane, choose Workloads > Pods.

  3. Find the pod and click Edit in the Actions column to add the following annotations:

    annotations:
      prometheus.io/path: /metrics # The HTTP path where you want to expose the metrics. 
      prometheus.io/port: "xxxx" # The port on which you want to expose the metrics. 
      prometheus.io/scrape: "true" # Specify whether to scrape the metrics.
  4. Click Update.

Step 2: Enable the feature

  1. Log on to the ARMS console.

  2. In the left navigation pane, click Integration Management.

  3. On the Integrated Environments tab, view the environment list on the Container Service tab. Find the ACK instance and click Metric Scraping in the Actions column.

  4. On the Metric Scraping tab, click Default Service Discovery.

  1. On the Default Service Discovery page, click Enabled to enable this feature.

    image

    After it is enabled, Managed Service for Prometheus collects the metrics exposed by all pods with the following annotations in the cluster:

    annotations:
      prometheus.io/path: /metrics # The HTTP path where you want to expose the metrics. 
      prometheus.io/port: "xxxx" # The port on which you want to expose the metrics. 
      prometheus.io/scrape: "true" # Specify whether to scrape the metrics.
  2. On the Metric Scraping tab, view the list of pods found by this feature.

Disable default service discovery

On the Default Service Discovery page, click Feature Disabled to disable this feature. After it is disabled, Managed Service for Prometheus no longer collects metrics exposed by pods with the prometheus.io annotations.