All Products
Search
Document Center

Application Real-Time Monitoring Service:Monitor AWS CloudWatch metrics in Managed Service for Prometheus

Last Updated:Mar 10, 2026

Scrape Amazon CloudWatch metrics into Alibaba Cloud Managed Service for Prometheus by using Yet Another CloudWatch Exporter (YACE), a Prometheus-community exporter optimized for lightweight CloudWatch metric collection. This enables cross-cloud monitoring of AWS resources alongside Alibaba Cloud services in a unified Prometheus workspace.

How it works

YACE runs as a pod in your Container Service for Kubernetes (ACK) cluster and collects CloudWatch metrics through a three-stage pipeline:

  1. Metric scraping: YACE periodically pulls metrics such as CPU utilization and disk I/O from Amazon Elastic Compute Cloud (Amazon EC2) instances through AWS APIs.

  2. Format conversion: YACE transforms CloudWatch metrics into Prometheus-compatible format.

  3. Endpoint exposure: YACE exposes an HTTP /metrics endpoint on default port 5000. Managed Service for Prometheus automatically discovers and scrapes this endpoint.

image

Prerequisites

Before you begin, make sure that you have:

Step 1: Deploy YACE in an ACK cluster

  1. Download the values.yaml file from the Helm chart repository and configure the following sections. Prometheus scrape annotations AWS authentication Use an AccessKey pair (recommended), a Kubernetes secret, or an IAM role. CloudWatch metric collection Configure only the products, metrics, and statistics you need. Amazon CloudWatch charges per metric API request.

    Note: The EC2 metrics above are for illustration. For a full list of AWS services that publish metrics to CloudWatch, see AWS services that publish CloudWatch metrics. Configure other products similarly.
       podAnnotations: {
         prometheus.io/path: /metrics,
         prometheus.io/port: "5000",
         prometheus.io/scrape: "true"
       }
       aws:
         role:
    
         # Reference a Kubernetes secret that stores AWS credentials.
         # Fields: access_key (AccessKey ID), secret_key (AccessKey Secret),
         # and optionally security_token (session token).
         secret:
           name:
           includesSessionToken: false
    
         # Specify these directly only if you did not configure a role or secret.
         aws_access_key_id:
         aws_secret_access_key:
       config: |-
         apiVersion: v1alpha1
         sts-region: us-west-1  # Must match the region of the AWS resource
         discovery:
           jobs:
           - type: AWS/EC2  # Product namespace (see https://github.com/prometheus-community/yet-another-cloudwatch-exporter)
             regions:
               - us-west-1
             searchTags:  # Filter instances by tag
               - key: scrapedEnable
                 value: ^(ali)$
             metrics:
               - name: CPUUtilization
                 statistics:
                 - Average
                 - Minimum
                 - Maximum
                 period: 60
                 length: 600
               - name: DiskReadOps
                 statistics:
                 - Sum
                 - Average
                 - Minimum
                 - Maximum
                 period: 60
                 length: 600
               - name: DiskWriteOps
                 statistics:
                 - Sum
                 - Average
                 - Minimum
                 - Maximum
                 period: 60
                 length: 600
               - name: DiskReadBytes
                 statistics:
                 - Sum
                 - Average
                 - Minimum
                 - Maximum
                 period: 60
                 length: 600
  2. Download the latest chart release and install it: Or install from the remote repository:

       helm install -f values.yaml yace-exporter-cw \
         ./prometheus-yet-another-cloudwatch-exporter-0.40.0.tgz \
         -n aws-cloudwatch
       helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
       helm repo update
       helm install -f values.yaml yace-exporter-cw \
         prometheus-community/prometheus-yet-another-cloudwatch-exporter \
         -n aws-cloudwatch

Step 2: Enable automatic metric scraping

After YACE is running in your ACK cluster, enable default service discovery in Managed Service for Prometheus so it automatically scrapes the YACE /metrics endpoint.

  1. Log on to the ARMS console. In the left-side navigation pane, click Integration Management.

  2. Select the region where the ACK cluster is deployed. On the Container Service tab, click the target environment name.

  3. Click the Metric Scraping tab. On the Default Service Discovery tab, click Enabled. The system now scrapes YACE metrics automatically.

    Enable default service discovery

  4. Click the Self-Monitoring tab to confirm that a scraping task named kubernetes-pods has been created. An up state indicates that metric scraping is active.

    Self-Monitoring tab showing kubernetes-pods task

Step 3: Validate metrics

Click the Metrics Explorer tab and verify that metrics prefixed with aws_ are available.

Metrics Explorer showing aws_ metrics

Configure alerts and dashboards

To set up alerts and dashboards for these metrics, follow steps 3 and 4 in Monitor an Alibaba Cloud service.