Monitoring Docker Containers with Prometheus
Prometheus monitoring is a great way to understand what the application is capable of, but it doesn't do much more to help us with monitoring Docker and the containers that we have running on our system. Fortunately, there are two ways we can collect data to give us greater insights into our running containers. We can expose metrics using the Docker daemon to Prometheus and can also install some extra applications, such as cAdvisor
, to collect further metrics on the containers running on our system.
With some minor changes to the Docker configurations, we are able to expose metrics to Prometheus to allow it to collect specific data of the Docker daemon running on our system. This will go part of the way to collecting the metrics but will not give us the metrics of the actual running containers. This is where we will then need to install cAdvisor
, which was created by Google specifically to collect our running container metrics.