update: Migrate Open Source Observability lab to the CloudWatch Observability add-on for AMP (OTel, drop ADOT) - #1905
Open
JaviGG02 wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for eks-workshop ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
… ADOT to the CloudWatch Observability add-on Collect metrics with the amazon-cloudwatch-observability add-on (CloudWatch agent on OpenTelemetry + Fluent Bit) writing to Amazon Managed Service for Prometheus via prometheusremotewrite + sigv4auth, scoped to the cluster-scraper agent. Keep AMP + self-managed Grafana; add a note on why Amazon Managed Grafana is preferable in production. Update terraform (pod-identity-agent add-on, Grafana ALB healthcheck-path, drop OTel operator/cert-manager/ADOT IRSA), cleanup and tests. Signed-off-by: Javier Garcia <jxgarci@amazon.com>
JaviGG02
force-pushed
the
oss-metrics-cloudwatch-addon
branch
from
August 12, 2026 14:12
53c76e5 to
a908ef0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Migrates the EKS Open Source Observability lab
(
open-source-metrics) to the current recommended setup(part of #1895, item 2): metrics are now collected by the
Amazon CloudWatch Observability EKS add-on — the
CloudWatch agent, which is built on the open-source
OpenTelemetry
collector
and Fluent Bit — instead of a manually-deployed ADOT
collector. The lab still stores metrics in Amazon
Managed Service for Prometheus (AMP) and visualizes
them in Grafana; only the collection layer changes. ADOT
is no longer referenced — the content explains the
CloudWatch agent is open source under the hood and notes
that any OpenTelemetry-compatible collector could
remote-write to AMP. This PR updates both the content
and the lab preparation (Terraform/cleanup/tests) so
the module is consistent and passes automated testing.
Content
adot.md(retitled "Collecting metrics with theCloudWatch agent"): replaced the hand-deployed
OpenTelemetryCollectorcustom resource with theamazon-cloudwatch-observabilityadd-on. The CloudWatchagent is granted AMP remote-write permissions via EKS
Pod Identity — an IAM role trusting
pods.eks.amazonaws.comwithAmazonPrometheusRemoteWriteAccess(+CloudWatchAgentServerPolicy), associated with thecloudwatch-agentservice account — then the add-on isinstalled with an OTel pipeline (Prometheus receiver →
prometheusremotewriteexporter +sigv4authextension).The pipeline is scoped to the single-replica
cluster-scraper agent so AMP doesn't receive duplicate
samples from the node DaemonSet. The page shows the add-on
pods and includes an info box noting any OTel-compatible
collector could be used.
index.md: updated the "Before you start" summaryand intro to describe the CloudWatch add-on (OTel + Fluent
Bit). Also corrected prose that claimed "Amazon Managed
Grafana" — the lab deploys self-managed Grafana.
application-metrics.md: de-branded; replaced thekubectl get opentelemetrycollectorinspection with thekubernetes-podsscrape job from the add-on config.kubernetes-dashboards.md: de-branded (metrics now"collected by the CloudWatch agent").
amp-ws.mdandaccessing-grafana.mdare unchanged (noADOT branding). Refreshed the AMP datasource screenshot.
accessing-grafana.md: added an info box onAmazon Managed Grafana for production — a fully
managed Grafana (in collaboration with Grafana Labs) with
no servers to operate, Grafana Enterprise plugins via AWS
without a separate Grafana Labs license, IAM Identity
Center/SAML sign-in, and native AWS data sources. The lab
keeps self-managed Grafana for simplicity.
Lab preparation (Terraform / cleanup / tests)
prepare-environmentnow installs theeks-pod-identity-agentadd-on (aws_eks_addon,resolve_conflicts_on_create=OVERWRITE) and keeps the AMPworkspace, self-managed Grafana and dashboard ConfigMap;
the OpenTelemetry operator, cert-manager and the ADOT IRSA
role are removed. Added
alb.ingress.kubernetes.io/healthcheck-path: /api/healthto the Grafana ingress so the ALB target is healthy —
Grafana redirects
/to302, which fails the ALB'sdefault
200health check. Droppedoperator_chart_version;outputs.tfdropsADOT_IAM_ROLE(keepsAMP_ENDPOINT).Pod Identity association and the
cloudwatch-agentIAMrole so the module is re-runnable; dropped the
opentelemetrycollectorscleanup.hook-install.shwaits for theeks-pod-identity-agentpods (was: theopentelemetrycollectorsCRD);hook-deploy-adot.shpolls AMP for the
upmetric.(
cwagent-amp/cloudwatch-agent-amp.yaml) referenced via::yamland applied withenvsubst(restricted to$AMP_ENDPOINT $AWS_REGION) rather than an in-labheredoc. It scrapes kubelet + cAdvisor (direct,
role: node, staticmetrics_path— no capture-groupreplacement, which the CloudWatch agent expands as an env
var) and application pods → AMP, feeding both the Order
Service Metrics and Kubernetes Cluster Monitoring
dashboards.
Which issue(s) this PR fixes:
Part of #1895
Testing
Ran
make test module="observability/open-source-metrics"→ 4 passing / 1 failing. The passing cases cover
prepare-environment, Collecting metrics with theCloudWatch agent (add-on → AMP), Storing metrics with
AMP, and Application Metrics. The single failure is the
Accessing Grafana hook, which curls the internet-facing
Grafana ALB — my test environment's egress cannot reach
the ALB's public IPs (corporate network), so the check
times out. This is an environment limitation, not a
content issue: Grafana is healthy and returns
200, andthe ALB target is healthy once the
/api/healthhealth-check path is applied. I verified end-to-end that
watch_orders_total, cAdvisor and kubelet metrics land inAMP with no duplicate-sample errors.
Quality checks
make test module="observability/open-source-metrics"(see[automated_tests.md](https://github.com/aws-samples/eks-wo
rkshop-v2/blob/main/docs/automated_tests.md)) — see the
Testing note above regarding the Grafana ALB hook
changes that will be included in the workshop release
notes
By submitting this pull request, I confirm that you can
use, modify, copy, and redistribute this contribution,
under the terms of your choice.