Interview Prep/Docker/Limits, logging, health checks and restarts

Alert when a container hits OOM.

IntermediateScenarioLimits, logging, health checks and restarts
Answer

Situation read → Need signal before customers complain.

What I'd do → Subscribe: docker events --filter event=oom, scrape cAdvisor metric container_oom_events_total, and alert from Prometheus. Also watch container_memory_working_set_bytes / limit > 0.9.

Why → OOM kill leaves exit code 137 and OOMKilled=true only until the container is removed.

Interview tip → Alert on approach, not only on death.

All Docker questions Roadmap: Docker & containers

More on Limits, logging, health checks and restarts