How do you monitor containers in production?
IntermediateProductionResource Limits, Health & Reliability
Answer
cAdvisor or the Docker metrics endpoint ("metrics-addr": "127.0.0.1:9323") scraped by Prometheus, node-exporter for host metrics, Grafana dashboards, and alerts on restarts, OOM kills, CPU throttling, disk usage of /var/lib/docker, and healthcheck failures. Add traces/logs via OpenTelemetry collector or Fluent Bit.
More on Resource Limits, Health & Reliability
How do you set memory and CPU limits, and what happens when they are exceeded?BeginnerWhat is the difference between `--cpus`, `--cpu-shares` and `--cpuset-cpus`?BeginnerWhat does `--memory-reservation` do?AdvancedHow do you diagnose an OOM-killed container?IntermediateWhy do JVM and Node services in containers need explicit memory flags?IntermediateWhat is CPU throttling, and how do you detect it?Advanced