Monitor containers in production, what do you collect?
IntermediateScenarioLimits, logging, health checks and restarts
Answer
Situation read → Need metrics, logs and events.
What I'd do → cAdvisor or the engine's Prometheus endpoint ("metrics-addr": "127.0.0.1:9323") for container metrics, node exporter for hosts, logs via Fluent Bit/Loki, alerts on restarts, OOM kills, unhealthy status and throttling. docker events --filter type=container for live events.
Why → Restarts and OOMs are the earliest failure signals.
Interview tip → Alert on rate of restarts, not individual ones.
More on Limits, logging, health checks and restarts
A Java container is OOM-killed at 512 MB. Why isn't the heap the whole story?IntermediateHow do you cap CPU and memory for a container and what happens on exceed?BeginnerLatency spikes though CPU usage looks low (50%).Advanced`docker logs` is empty but the app is running.BeginnerConfigure log rotation globally.BeginnerShip container logs to a central system.Intermediate