Book Image

Monitoring Docker

By : Russ McKendrick
Book Image

Monitoring Docker

By: Russ McKendrick

Overview of this book

This book will show you how monitoring containers and keeping a keen eye on the working of applications helps improve the overall performance of the applications that run on Docker. With the increased adoption of Docker containers, the need to monitor which containers are running, what resources they are consuming, and how these factors affect the overall performance of the system has become the need of the moment. This book covers monitoring containers using Docker's native monitoring functions, various plugins, as well as third-party tools that help in monitoring. Well start with how to obtain detailed stats for active containers, resources consumed, and container behavior. We also show you how to use these stats to improve the overall performance of the system. Next, you will learn how to use SysDig to both view your containers performance metrics in real time and record sessions to query later. By the end of this book, you will have a complete knowledge of how to implement monitoring for your containerized applications and make the most of the metrics you are collecting
Table of Contents (15 chapters)
Monitoring Docker
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Docker metrics


For each container, Zabbix discovers the following metrics that will be recorded:

  • Container (your Containers name) is running

  • CPU system time

  • CPU user time

  • Used cache memory

  • Used RSS memory

  • Used swap

Apart from "Used swap", these are the same metrics recorded by cAdvisor.

Create custom graphs

You can access a time-based graph for any of the metrics collected by Zabbix; you can also create your own custom graphs. In the following graph, I have created a graph that plots all the CPU System stats from the three web containers we launched earlier in the chapter:

As you can see, I performed a few tests using ApacheBench to make the graph a little more interesting.

For more information on how to create custom graphs, see the graphs section of the documentation site at https://www.zabbix.com/documentation/2.4/manual/config/visualisation/graphs.

Compare containers to your host machine

As we added the Linux OS template and the Docker template to the host and we are also recording quite a lot of...