Use Yet Another CloudWatch Exporter (yace-exporter) to scrape Amazon CloudWatch metrics into Managed Service for Prometheus for cross-cloud monitoring.
Prerequisites
How it works
-
Metric scraping: yace-exporter periodically fetches metrics such as EC2 CPU utilization and disk I/O from Amazon CloudWatch through AWS APIs.
-
Format conversion: yace-exporter converts AWS metrics to standard Prometheus format.
-
Endpoint exposure: yace-exporter exposes a
/metricsendpoint on the configured HTTP port (default:5000). Managed Service for Prometheus scrapes this endpoint through service discovery.
Procedure
Step 1: Deploy yace-exporter in an ACK cluster
yace-exporter is a high-performance, cost-efficient, community-developed CloudWatch metric exporter.
1.1 Download and modify values.yaml
Download the values.yaml file.
Configuration details:
# Configure the Prometheus scrape path and port.
podAnnotations: {
prometheus.io/path: /metrics,
prometheus.io/port: "5000",
prometheus.io/scrape: "true"
}
# Configure the AWS authentication method. Choose one of the following methods. The AccessKey pair method is recommended.
aws:
role:
# The name of a pre-created secret in which AWS credentials are stored. When
# set, aws_access_key_id is assumed to be in a field called access_key,
# aws_secret_access_key is assumed to be in a field called secret_key, and the
# session token, if it exists, is assumed to be in a field called
# security_token
secret:
name:
includesSessionToken: false
# Note: Do not specify the aws_access_key_id and aws_secret_access_key if you specified role or secret.name before
aws_access_key_id:
aws_secret_access_key:
# Configure the metrics to be collected from Amazon CloudWatch. To minimize costs, configure only the required products, metrics, and statistics. Amazon CloudWatch bills based on the number of requested metrics.
config: |-
apiVersion: v1alpha1
sts-region: us-west-1 # We recommend that you set the AWS authentication region to be the same as the region of your cloud service.
discovery:
jobs:
- type: AWS/EC2 # For the supported product namespaces, see https://github.com/prometheus-community/yet-another-cloudwatch-exporter.
regions:
- us-west-1 # The region where the cloud service resides.
searchTags: # Configure the tags of cloud service instances from which metrics are scraped into Prometheus.
- key: scrapedEnable
value: ^(ali)$
metrics: # Configure the list of metrics to collect. For information about the metrics supported by each cloud service in Amazon CloudWatch, see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html. The following code provides an example of how to collect several metrics for Amazon EC2. The configurations for other services are similar.
- name: CPUUtilization
statistics: # The aggregation method. Valid values are also listed in the AWS documentation: Average, Minimum, Maximum, and Sum.
- 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
1.2 Install the Helm chart
Download the latest Helm chart.
helm install -f values.yaml yace-exporter-cw ./prometheus-yet-another-cloudwatch-exporter-0.40.0.tgz -n aws-cloudwatch
Alternatively, add the repository and install the chart directly:
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 scraping in Managed Service for Prometheus
Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.
-
In the top navigation bar, select the region of your ACK cluster. On the Container Service tab, click your cluster name.
-
Click the Metric Scraping tab. On the Default Service Discovery page, click Enabled.

After you enable this feature, metrics from yace-exporter are scraped automatically.
-
Click the Self-Monitoring tab to view the scraping tasks.

A scraping task named
kubernetes-podsis created automatically. Anupstatus confirms that scraping is active.
Step 3: Verify metrics and configure dashboards and alerts
Once scraping is configured, open Metrics Explorer and search for metrics prefixed with aws_ to confirm that Managed Service for Prometheus is collecting them.
To configure dashboards and alerts, follow Step 3 and Step 4 in Cloud Service Observability.