Docker · Containers in practice

What would you monitor for containers in production?

MediummonitoringmetricsobservabilityUpdated Oct 2026
Quiz this track

Short answer

Track container resource usage and throttling, application latency and errors, restarts, and host capacity. Collect logs and metrics centrally and alert on symptoms users feel.

Container-level metrics show whether the platform is healthy: CPU throttling, memory working set, OOM kills, restarts and filesystem usage. Application metrics show whether users are being served: request rate, latency, error rate and saturation.

yaml
services:
  api:
    image: registry.example.com/api:1.0.0
    ports:
      - "3000:3000"
  prometheus:
    image: prom/prometheus
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
  grafana:
    image: grafana/grafana
    ports:
      - "3001:3000"
A common local stack: scrape application metrics and visualise them centrally.

Signals to alert on

  • Error rate and latency at the user-facing boundary
  • Container restarts and OOM kills
  • CPU throttling rather than only average CPU
  • Memory growth that trends toward the limit
  • Disk usage for logs, images and volumes
  • Certificate expiry and dependency health

Host-level collection with cAdvisor or node_exporter complements application metrics. Without host metrics, a container problem caused by a full disk or exhausted inodes looks like a mysterious application failure.

Monitoring is not the same as healthchecks. A healthcheck reports one container's state; monitoring gives you history, trends and cross-service context for diagnosis.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why is average CPU a poor signal for container health?
  2. 2What do restarts tell you that logs might not?
  3. 3How do you monitor disk usage from images and logs?
  4. 4Which alert would you page on first?

Say it in the interview

I monitor both platform and application signals: throttling, memory pressure, OOM kills, restarts and disk usage, plus request rate, latency and errors at the user boundary. I alert on symptoms users feel and use container metrics to explain them. I also watch disk and certificate expiry, because those cause outages that look like application bugs.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Docker mock interview and get scored feedback on depth, clarity and confidence.