Container Monitoring with Amazon Managed Service for Prometheus - Collecting and Analyzing EKS Metrics

Collect EKS/ECS metrics in a Prometheus-compatible format and query them with PromQL. Learn how to build a container monitoring platform integrated with Managed Grafana.

Overview of Managed Prometheus

Managed Service for Prometheus is a Prometheus-compatible managed monitoring service. It automates Prometheus server provisioning, scaling, storage management, and high-availability configuration, letting you focus on metrics collection and querying. You send metrics via the Prometheus remote write API and run queries with PromQL. Existing Prometheus exporters, Grafana dashboards, and alert rules can be migrated as-is.

Integration with EKS

The standard pattern for collecting metrics from EKS clusters is to deploy an ADOT (AWS Distro for OpenTelemetry) collector as a DaemonSet. The ADOT collector scrapes metrics from each node's kubelet, cAdvisor, and kube-state-metrics, then sends them to the Managed Prometheus remote write endpoint. IRSA (IAM Roles for Service Accounts) grants the ADOT collector write permissions to Managed Prometheus. If you are using Prometheus Operator, you can keep your ServiceMonitor and PodMonitor configurations as-is and simply change the remote write destination to Managed Prometheus to complete the migration.

PromQL and Alerting

Use PromQL to query collected metrics and build dashboards in Managed Grafana. In addition to standard Kubernetes metrics such as CPU usage, memory usage, pod restart counts, and request latency, you can also collect and visualize application-specific custom metrics. Alert Manager lets you define PromQL-based alert rules and send notifications to SNS topics. Metrics are retained for 150 days, making them useful for long-term capacity planning and trend analysis. For designing container monitoring operations, related books (Amazon) can be a helpful reference.

Managed Prometheus Pricing

Managed Prometheus pricing consists of metric ingestion, storage, and queries. Ingestion costs approximately $0.90 per 10 million samples for the first 2 billion samples/month. Storage costs approximately $0.03 per GB/month, with a 150-day retention period. Queries are billed based on samples processed, at approximately $0.10 per 10 million samples. Compared to self-hosted Prometheus servers, the managed service tends to have a lower total cost for medium and larger environments, since it eliminates EC2 instance operational costs and storage management overhead.

Summary

Managed Prometheus is a Prometheus-compatible managed monitoring service optimized for collecting metrics from container workloads. The standard integration pattern is to automatically collect metrics from EKS using the ADOT collector, query them with PromQL, and visualize them in Managed Grafana.