Amazon EKS — Prometheus & Grafana
Prometheus & Grafana
Prometheus + Grafana is the most popular open-source monitoring stack for Kubernetes. Amazon Managed Prometheus (AMP) and Amazon Managed Grafana (AMG) provide managed versions.
Architecture
Prometheus + Grafana Stack
┌──────────────────────────────────────────────────────┐
│ │
│ Pods/Nodes │
│ ┌────────┐ ┌────────┐ ┌────────┐ │
│ │ /metrics│ │/metrics│ │/metrics│ │
│ └────┬───┘ └───┬────┘ └────┬───┘ │
│ │ │ │ │
│ └─────────┼───────────┘ │
│ │ scrape │
│ ┌─────▼──────┐ ┌───────────┐ │
│ │ Prometheus │────▶│ Grafana │ │
│ │ (collect) │ │ (visualize)│ │
│ └────────────┘ └───────────┘ │
│ │ │
│ ┌─────▼──────┐ │
│ │ AlertManager│ │
│ │ (alert) │ │
│ └─────────────┘ │
└──────────────────────────────────────────────────────┘
Install with Helm
$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
$ helm install kube-prometheus prometheus-community/kube-prometheus-stack \
--namespace monitoring --create-namespace \
--set grafana.adminPassword=admin
This installs: Prometheus, Grafana, AlertManager, node-exporter, kube-state-metrics.
Amazon Managed Prometheus (AMP)
# Create AMP workspace
$ aws amp create-workspace --alias demo-metrics
# Configure remote write in Prometheus
# (sends metrics to AMP for long-term storage)
Key Dashboards
| Dashboard | ID | Shows |
|---|---|---|
| Kubernetes Cluster | 315 | Cluster overview |
| Node Exporter | 1860 | Node-level metrics |
| Kubernetes Pods | 6336 | Pod CPU/memory/network |
Common Mistakes
| Mistake | Impact |
|---|---|
| No persistent storage for Prometheus | Metrics lost on restart |
| Too many high-cardinality labels | Prometheus OOM |
| Not setting retention period | Disk fills up |
What’s Next?
Centralized logs: Logging with Fluent Bit.