Prometheus monitoring on Amazon EKS
Amazon Managed Service for Prometheus 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 Amazon Managed Service for Prometheus provides more flexibility for ingesting, storing, and querying Prometheus metrics:
-
Amazon Managed Service for Prometheus enables you to use existing Prometheus servers deployed in Amazon EKS or self-managed Kubernetes and configure them to write to Amazon Managed Service for Prometheus 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. Amazon Managed Service for Prometheus 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 Amazon Managed Service for Prometheus could meet your requirements. Amazon Managed Service for Prometheus integrates with Amazon Managed Grafana 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 Amazon Managed Service for Prometheus 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 Amazon Managed Service for Prometheus workspace. If you use Amazon Managed Grafana, then you can directly integrate Amazon Managed Grafana with your Amazon Managed Service for Prometheus data source by using the included plugin. Because metric data is stored in Amazon Managed Service for Prometheus, 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 Amazon Managed Service for Prometheus. For more information about ADOT Collector, see the AWS Distro for OpenTelemetry