Docker Integration for Grafana Cloud
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
This integration focuses on showing overall utilization of containers running in Docker, using cAdvisor.
Use the walkthrough in Grafana Cloud to install the Docker Integration.
Pre-install configuration for the Docker Integration
In order for the integration to work, you must install and run cAdvisor to collect container metrics.
This integration assumes that you have disabled the
percpu metrics, and that you are only collecting docker container metrics. An example of running cAdvisor with the necessary settings would be;
VERSION=v0.37.5 # use the latest release version from https://github.com/google/cadvisor/releases sudo docker run \ --volume=/:/rootfs:ro \ --volume=/var/run:/var/run:ro \ --volume=/sys:/sys:ro \ --volume=/var/lib/docker/:/var/lib/docker:ro \ --volume=/dev/disk/:/dev/disk:ro \ --publish=8080:8080 \ --detach=true \ --name=cadvisor \ --privileged \ --device=/dev/kmsg \ gcr.io/cadvisor/cadvisor:$VERSION --disable_metrics=percpu --docker_only=true
Post-install configuration for the Docker Integration
The following agent configuration defines a scrape job that pulls the metrics from a cAdvisor instance on
localhost on the port defined in the example config above. If cAdvisor is running on a different host the address must be adjusted to match.
prometheus: wal_directory: /tmp/wal global: scrape_interval: 5s configs: - name: integrations scrape_configs: - job_name: docker-integration static_configs: - targets: ['localhost:8080'] remote_write: - url: http://cortex:9009/api/prom/push
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.
Using Grafana Cloud to drive manufacturing plant efficiency
This GrafanaCONline session tells how Grafana helps a 75-year-old manufacturing company with product quality and equipment maintenance.