Difficulty: Beginner
Estimated Time: 10 minutes

When running containers in production, it's important to monitor there runtime metrics, such as CPU usage and memory, to ensure they're behaving as expected. These metrics can also help diagnose issues if they occur.

In this scenario, we'll explore the built-in metrics provided by Docker to give additional visibility to the running containers. In future, we'll investigate more details about running Docker in production.

In this scenario we explored how you can gain more visibility into the CPU, memory and IO of a running container to ensure it's working as expected and to diagnose problems.

In future scenarios we'll investigate how these metrics and the API can be combined to create additional insights and dashboards.

Docker Stats

Step 1 of 2

Step 1 - Single Container

The environment has a container running with the name nginx. You can find the stats for the container by using:

docker stats nginx

This launches a terminal window which refreshes itself with live data from the container.

To quit, use CTRL+C to stop the running progress.