EKS open source observability
Prepare your environment for this section:
This will make the following changes to your lab environment:
- Install the EKS Pod Identity Agent add-on (a prerequisite for granting the CloudWatch agent permissions via EKS Pod Identity)
- Provision an Amazon Managed Service for Prometheus workspace
- Install Grafana in the cluster with the workspace configured as a data source
You can view the Terraform that applies these changes here.
In this lab, we'll collect the metrics from the application using the Amazon CloudWatch Observability EKS add-on, store the metrics in Amazon Managed Service for Prometheus and visualize them using Grafana.
The CloudWatch Observability add-on deploys the CloudWatch agent, which is built on open source: it runs an embedded OpenTelemetry collector and ships logs with Fluent Bit. Part of the Cloud Native Computing Foundation, OpenTelemetry provides open source APIs, libraries, and agents to collect distributed traces and metrics for application monitoring. Because the collector bundles the Prometheus receiver and the Prometheus Remote Write exporter, we can use the add-on to scrape Prometheus metrics from the cluster and remote-write them to Amazon Managed Service for Prometheus, with no separate collector to deploy or maintain.
Amazon Managed Service for Prometheus is a Prometheus-compatible monitoring service based on the Cloud Native Computing Foundation (CNCF) Prometheus project. It removes the work of running and scaling your own Prometheus, whether you are monitoring Amazon Elastic Kubernetes Service, Amazon Elastic Container Service, or self-managed Kubernetes clusters.
If you are using the CDK Observability Accelerator then check out the collection of Open Source Observability Patterns covering a wide range of use cases including ADOT collector, GPU Monitoring with Nvidia DCGM and many more.