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

Chapter 7. Collecting Application Logs from within the Container

One of the most overlooked parts of monitoring are log files generated by the application or services such as NGINX, MySQL, Apache, and so on. So far we have looked at various ways of recording the CPU and RAM utilization of the processes within your containers are at a point in time, now its time to do the same for the log files.

If you are running your containers as Cattle or Chickens, then the way you deal with the issues to destroy and relaunch your container either manually or automatically is important. While this should fix the immediate problem, it does not help with tracking down the root cause of the issue and if you don't know that then how can you attempt to resolve it so that it does not reoccur.

In this chapter, we will look at how we can get the content of the log files for the applications running within our containers to the central location so that they are available, even if you have to destroy and replace...