Prometheus monitoring on Amazon EKS - AWS Prescriptive Guidance

Prometheus monitoring on Amazon EKS

Amazon Managed Service for Prometheus (AMP) provides a scalable, secure, AWS managed service for open-source Prometheus. You can use Prometheus query language (PromQL) to monitor the performance of containerized workloads without managing the underlying infrastructure for ingesting, storing, and querying operational metrics. You can collect Prometheus metrics from Amazon EKS and Amazon ECS by using AWS Distro for OpenTelemetry (ADOT) or Prometheus servers as collection agents.

CloudWatch Container Insights monitoring for Prometheus enables you to configure and use the CloudWatch agent to discover Prometheus metrics from Amazon ECS, Amazon EKS, and Kubernetes workloads, and ingest them as CloudWatch metrics. This solution is appropriate if CloudWatch is your primary observability and monitoring solution. However, the following list outlines use cases where AMP provides more flexibility for ingesting, storing, and querying Prometheus metrics:

  • AMP enables you to use existing Prometheus servers deployed in Amazon EKS or self-managed Kubernetes and configure them to write to AMP instead of a locally configured data store. This removes the undifferentiated heavy lifting of managing a highly available data store for your Prometheus servers and its infrastructure. AMP is a suitable choice when you have a mature Prometheus deployment that you want to leverage in the AWS Cloud.

  • Grafana directly supports Prometheus as a data source for visualization. If you want to use Grafana with Prometheus instead of CloudWatch Dashboards for your container monitoring, then AMP could meet your requirements. AMP integrates with Amazon Managed Service for Grafana (AMG) to provide a managed open-source monitoring and visualization solution.

  • Prometheus enables you to perform analysis on your operational metrics by using PromQL queries. In contrast, the CloudWatch agent ingests Prometheus metrics in embedded metric format into CloudWatch Logs which result in CloudWatch metrics. You can query the embedded metric format logs by using CloudWatch Logs Insights.

  • If you don’t plan to use CloudWatch for monitoring and metrics capture, then you should use AMP with your Prometheus server and a visualization solution such as Grafana. You need to configure your Prometheus server to scrape metrics from your Prometheus targets and configure the server to remote write to your AMP workspace. If you use AMG, then you can directly integrate AMG with your AMP data source by using the included plugin. Because metric data is stored in AMP, there is no dependency to deploy the CloudWatch agent or requirement to ingest data into CloudWatch. The CloudWatch agent is required for Container Insights monitoring for Prometheus.

You can also use the ADOT Collector to scrape from a Prometheus-instrumented application and send the metrics to AMP. For more information about ADOT Collector, see the AWS Distro for OpenTelemetry documentation.