Docker monitoring

Docker monitoring with Prometheus and cAdvisor with node and service selection

Docker monitoring screenshot 1
Docker monitoring screenshot 2

This is a dashboard for monitoring Docker container metrics collected by cAdvisor and stored in Prometheus TSDB.

Inspired by 193 and 8321

Features:

  • Depend on only cAdvisor metrics.
  • Select Jobs, Nodes and Services. Multi-value and Select-all are supported.
  • Use the new Time series panel. Faster
  • Merge network transmit and receive into one longer panel.
  • Merge Disk read and write into one longer panel.

This dashboard use the following metrics and their corresponding cadvisor model:

  • container_cpu_user_seconds_total : cpu
  • container_memory_usage_bytes : memory
  • container_network_receive_bytes_total : network
  • container_network_transmit_bytes_total : network
  • container_fs_reads_bytes_total : diskIO
  • container_fs_writes_bytes_total : diskIO

This dashboard expects the following labels on the metrics:

  • job
  • service
  • node
  • container

You may assign container_label_com_docker_swarm_service_name to service, and name to container using Prometheus’ metric_relabel_configs. Here is an example of the scrape rules.

metric_relabel_configs:
      - source_labels: ['container_label_com_docker_swarm_service_name']
        target_label: 'service'
      - source_labels: ['name']
        target_label: 'container'

You can add container_label_com_docker_swarm_service_name to the container by setting allowlisted_container_labels: ['com.docker.swarm.service.name'] for the cadvisor.

Revisions
RevisionDescriptionCreated
Docker

Docker

by Grafana Labs
Grafana Labs solution

Easily monitor Docker with Grafana Cloud's out-of-the-box monitoring solution.

Learn more

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies