0
0
Dockerdevops~20 mins

Why monitoring containers matters in Docker - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Container Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why is monitoring container resource usage important?

Imagine you run many containers on a server. Why should you monitor their CPU and memory usage?

ATo stop containers automatically when they use any CPU
BTo detect if a container is using too many resources and might slow down others
CBecause containers never use resources, so monitoring is not needed
DTo increase the size of the container images
Attempts:
2 left
💡 Hint

Think about how one container using too much CPU affects others.

💻 Command Output
intermediate
2:00remaining
What does this Docker stats command output show?

Run docker stats --no-stream on a server with two containers. What does the output tell you?

Docker
CONTAINER ID   NAME       CPU %     MEM USAGE / LIMIT     MEM %     NET I/O       BLOCK I/O     PIDS
abc123         webapp     5.23%     50MiB / 2GiB          2.44%     1.2MB / 1MB   0B / 0B       10
xyz789         db         80.00%    1.5GiB / 2GiB         75.00%    5MB / 3MB     10MB / 5MB    50
AThe db container is using most CPU and memory, which might slow down the webapp container
BBoth containers are using no resources
CThe webapp container is using more CPU than the db container
DThe output shows container logs
Attempts:
2 left
💡 Hint

Look at CPU % and MEM % columns to compare usage.

🔀 Workflow
advanced
2:00remaining
Which step is missing in this container monitoring setup?

You want to monitor container logs and resource usage continuously. You set up Prometheus to collect metrics but forget one important step. What is it?

ABuilding container images with Dockerfile
BWriting application code
CRunning containers with <code>docker run</code>
DInstalling and configuring exporters inside containers or on the host
Attempts:
2 left
💡 Hint

Prometheus needs data sources to collect metrics from.

Troubleshoot
advanced
2:00remaining
Why might container metrics stop updating in your monitoring dashboard?

Your monitoring dashboard shows container metrics but suddenly stops updating for one container. What could be a likely cause?

AYou updated the container's environment variables
BThe container image size increased
CThe container crashed or stopped running
DYou restarted the monitoring dashboard
Attempts:
2 left
💡 Hint

If a container is not running, can it send metrics?

Best Practice
expert
3:00remaining
What is the best practice for monitoring containers in a production environment?

Choose the best practice for effective container monitoring in production.

AUse centralized monitoring tools with alerting and log aggregation for all containers
BManually check each container's logs daily
CIgnore monitoring because containers are isolated
DOnly monitor containers when users report problems
Attempts:
2 left
💡 Hint

Think about automation and early problem detection.