Chapter 9 Excerpt of Docker Cookbook: Monitoring Containers
When operating distributed systems and distributed applications, you need access to as much information as possible. This paper provides developers, operators, and IT professionals with a dozen proven recipes for Monitoring Docker Containers.
With these practical solutions, experienced developers with no previous knowledge of Docker will be able to use some basic Docker commands that give you basic debugging tools that you can use in small-scale deployments or when you have to dive deeper into a specific container.
The recipes in this chapter will help you:
- Get detailed information about a container with Docker inspect
- Obtain usage statistics of a running container
- Listen to Docker events on your Docker hosts
- Get the logs of a container with Docker logs
- Use a different logging driver than the Docker daemon
- Use Logspout to collect container logs
- Manage Logspout routes to store container logs
- Use Elasticsearch and Kibana to store and visualize container logs
- Use Collectd to visualize container metrics
- Use cAdvisor to monitor resource usage in containers
- Monitor container metrics with InfluxDB, Grafana, and cAdvisor
- Gain visibility into your containers’ layout with Weave Scope