Menu
Grafana Cloud

Docker Desktop integration for Grafana Cloud

Docker Desktop is an easy-to-install application for your Mac, Windows or Linux environment that enables you to build and share containerized applications and microservices. This integration allows you to monitor your local Docker Desktop instance using the Grafana Cloud extension in Docker Desktop.The integration includes dashboard to monitor Docker metrics and logs as well as the Linux host metrics and logs.

This integration includes 8 pre-built dashboards to help monitor and visualize Docker Desktop metrics and logs.

Before you begin

Go to Docker Desktop extensions marketplace, search for Grafana cloud and install the Grafana cloud extension. Once it is installed, open the extension from the side bar and connect your Grafana cloud account.

Install the integration to get the values of connection variables required to connect your account.

Install Docker Desktop integration for Grafana Cloud

  1. In your Grafana Cloud stack, click Connections in the left-hand menu.
  2. Find Docker Desktop and click its tile to open the integration.
  3. Review the prerequisites in the Configuration Details tab and set up Grafana Agent to send Docker Desktop metrics and logs to your Grafana Cloud instance.
  4. Click Install to add this integration’s pre-built dashboards to your Grafana Cloud instance, and you can start monitoring your Docker Desktop setup.

Post-install configuration for the Docker Desktop integration

After installing the integration, an api key is required to generate the connection variables. Either create a new api key or use an existing api key and get the value for connection variables.

image

Copy the value of connection variables into the connect account page of the Grafana cloud extension.

image

Click on Connect to Grafana Cloud to connect your docker desktop instance to your Grafana cloud stack and start sending logs and metrics. After connecting successfully, you would see the Agent control panel screen.

Agent control panel

The agent control panel shows the status of the Grafana agent running inside the docker desktop extension. It also allows you to view the logs of the agent container and edit the agent configuration file if required.

image

Enabling other integrations

The agent configuration file can be edited from the Agent control panel UI to enable other integrations from the agent or add further metrics or logs targets. In order for the grafana agent container inside the extension to access the docker host, connect it to the default network using: docker network connect bridge grafana-docker-desktop-extension-agent

Then the agent can access the docker desktop host using host.docker.internal hostname.

Full example configuration for Grafana Agent

Refer to the following Grafana Agent configuration for a complete example that contains all the snippets used for the Docker Desktop integration. This example also includes metrics that are sent to monitor your Grafana Agent instance.

yaml
integrations:
  prometheus_remote_write:
  - basic_auth:
      password: <your_prom_pass>
      username: <your_prom_user>
    url: <your_prom_url>
  agent:
    enabled: true
    relabel_configs:
    - action: replace
      source_labels:
      - agent_hostname
      target_label: instance
    - action: replace
      target_label: job
      replacement: "integrations/agent-check"
    metric_relabel_configs:
    - action: keep
      regex: (prometheus_target_.*|prometheus_sd_discovered_targets|agent_build.*|agent_wal_samples_appended_total|process_start_time_seconds)
      source_labels:
      - __name__
  # Add here any snippet that belongs to the `integrations` section.
  # For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
logs:
  configs:
  - clients:
    - basic_auth:
        password: <your_loki_pass>
        username: <your_loki_user>
      url: <your_loki_url>
    name: integrations
    positions:
      filename: /tmp/positions.yaml
    scrape_configs:
      # Add here any snippet that belongs to the `logs.configs.scrape_configs` section.
      # For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
metrics:
  configs:
  - name: integrations
    remote_write:
    - basic_auth:
        password: <your_prom_pass>
        username: <your_prom_user>
      url: <your_prom_url>
    scrape_configs:
      # Add here any snippet that belongs to the `metrics.configs.scrape_configs` section.
      # For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
  global:
    scrape_interval: 60s
  wal_directory: /tmp/grafana-agent-wal

Dashboards

The Docker Desktop integration installs the following dashboards in your Grafana Cloud instance to help monitor your system.

  • Docker Desktop - Docker Logs
  • Docker Desktop - Docker Overview
  • Docker Desktop - Node Exporter / Node CPU and System
  • Docker Desktop - Node Exporter / Node Filesystem and Disk
  • Docker Desktop - Node Exporter / Node Fleet Overview
  • Docker Desktop - Node Exporter / Node Memory
  • Docker Desktop - Node Exporter / Node Network
  • Docker Desktop - Node Exporter / Node Overview

Docker Overview & Compute

image

Docker Logs

image

Docker Linux Virtual Machine Overview and Logs

image

Metrics

The most important metrics provided by the Docker Desktop integration, which are used on the pre-built dashboards, are as follows:

  • container_cpu_usage_seconds_total
  • container_fs_inodes_free
  • container_fs_inodes_total
  • container_fs_limit_bytes
  • container_fs_usage_bytes
  • container_last_seen
  • container_memory_usage_bytes
  • container_network_receive_bytes_total
  • container_network_tcp_usage_total
  • container_network_transmit_bytes_total
  • container_spec_memory_reservation_limit_bytes
  • machine_memory_bytes
  • machine_scrape_error
  • node_arp_entries
  • node_boot_time_seconds
  • node_context_switches_total
  • node_cpu_seconds_total
  • node_disk_io_time_seconds_total
  • node_disk_io_time_weighted_seconds_total
  • node_disk_read_bytes_total
  • node_disk_read_time_seconds_total
  • node_disk_reads_completed_total
  • node_disk_write_time_seconds_total
  • node_disk_writes_completed_total
  • node_disk_written_bytes_total
  • node_filesystem_avail_bytes
  • node_filesystem_device_error
  • node_filesystem_files
  • node_filesystem_files_free
  • node_filesystem_readonly
  • node_filesystem_size_bytes
  • node_intr_total
  • node_load1
  • node_load15
  • node_load5
  • node_memory_Active_anon_bytes
  • node_memory_Active_bytes
  • node_memory_Active_file_bytes
  • node_memory_AnonHugePages_bytes
  • node_memory_AnonPages_bytes
  • node_memory_Bounce_bytes
  • node_memory_Buffers_bytes
  • node_memory_Cached_bytes
  • node_memory_CommitLimit_bytes
  • node_memory_Committed_AS_bytes
  • node_memory_DirectMap1G_bytes
  • node_memory_DirectMap2M_bytes
  • node_memory_DirectMap4k_bytes
  • node_memory_Dirty_bytes
  • node_memory_HugePages_Free
  • node_memory_HugePages_Rsvd
  • node_memory_HugePages_Surp
  • node_memory_HugePages_Total
  • node_memory_Hugepagesize_bytes
  • node_memory_Inactive_anon_bytes
  • node_memory_Inactive_bytes
  • node_memory_Inactive_file_bytes
  • node_memory_Mapped_bytes
  • node_memory_MemAvailable_bytes
  • node_memory_MemFree_bytes
  • node_memory_MemTotal_bytes
  • node_memory_SReclaimable_bytes
  • node_memory_SUnreclaim_bytes
  • node_memory_ShmemHugePages_bytes
  • node_memory_ShmemPmdMapped_bytes
  • node_memory_Shmem_bytes
  • node_memory_SwapTotal_bytes
  • node_memory_VmallocChunk_bytes
  • node_memory_VmallocTotal_bytes
  • node_memory_VmallocUsed_bytes
  • node_memory_WritebackTmp_bytes
  • node_memory_Writeback_bytes
  • node_netstat_Icmp6_InErrors
  • node_netstat_Icmp6_InMsgs
  • node_netstat_Icmp6_OutMsgs
  • node_netstat_Icmp_InErrors
  • node_netstat_Icmp_InMsgs
  • node_netstat_Icmp_OutMsgs
  • node_netstat_IpExt_InOctets
  • node_netstat_IpExt_OutOctets
  • node_netstat_TcpExt_ListenDrops
  • node_netstat_TcpExt_ListenOverflows
  • node_netstat_TcpExt_TCPSynRetrans
  • node_netstat_Tcp_InErrs
  • node_netstat_Tcp_InSegs
  • node_netstat_Tcp_OutRsts
  • node_netstat_Tcp_OutSegs
  • node_netstat_Tcp_RetransSegs
  • node_netstat_Udp6_InDatagrams
  • node_netstat_Udp6_InErrors
  • node_netstat_Udp6_NoPorts
  • node_netstat_Udp6_OutDatagrams
  • node_netstat_Udp6_RcvbufErrors
  • node_netstat_Udp6_SndbufErrors
  • node_netstat_UdpLite_InErrors
  • node_netstat_Udp_InDatagrams
  • node_netstat_Udp_InErrors
  • node_netstat_Udp_NoPorts
  • node_netstat_Udp_OutDatagrams
  • node_netstat_Udp_RcvbufErrors
  • node_netstat_Udp_SndbufErrors
  • node_network_carrier
  • node_network_info
  • node_network_mtu_bytes
  • node_network_receive_bytes_total
  • node_network_receive_compressed_total
  • node_network_receive_drop_total
  • node_network_receive_errs_total
  • node_network_receive_fifo_total
  • node_network_receive_multicast_total
  • node_network_receive_packets_total
  • node_network_speed_bytes
  • node_network_transmit_bytes_total
  • node_network_transmit_compressed_total
  • node_network_transmit_drop_total
  • node_network_transmit_errs_total
  • node_network_transmit_fifo_total
  • node_network_transmit_multicast_total
  • node_network_transmit_packets_total
  • node_network_transmit_queue_length
  • node_network_up
  • node_nf_conntrack_entries
  • node_nf_conntrack_entries_limit
  • node_os_info
  • node_sockstat_FRAG6_inuse
  • node_sockstat_FRAG_inuse
  • node_sockstat_RAW6_inuse
  • node_sockstat_RAW_inuse
  • node_sockstat_TCP6_inuse
  • node_sockstat_TCP_alloc
  • node_sockstat_TCP_inuse
  • node_sockstat_TCP_mem
  • node_sockstat_TCP_mem_bytes
  • node_sockstat_TCP_orphan
  • node_sockstat_TCP_tw
  • node_sockstat_UDP6_inuse
  • node_sockstat_UDPLITE6_inuse
  • node_sockstat_UDPLITE_inuse
  • node_sockstat_UDP_inuse
  • node_sockstat_UDP_mem
  • node_sockstat_UDP_mem_bytes
  • node_sockstat_sockets_used
  • node_softnet_dropped_total
  • node_softnet_processed_total
  • node_softnet_times_squeezed_total
  • node_time_zone_offset_seconds
  • node_timex_estimated_error_seconds
  • node_timex_maxerror_seconds
  • node_timex_offset_seconds
  • node_uname_info
  • node_vmstat_oom_kill
  • node_vmstat_pgfault
  • node_vmstat_pgmajfault
  • node_vmstat_pgpgin
  • node_vmstat_pgpgout
  • node_vmstat_pswpin
  • node_vmstat_pswpout
  • process_max_fds
  • process_open_fds

Changelog

md
# 1.0.0 - September 2023

* Add updated status panels
* Update linux mixin
    * This update introduces 3-tier view of linux nodes:
    * TOP: Fleet view: see group of your linux instances at once
    * Overview of the specific node: see specific node at a glance
    * Drill down: Set of dashboards for deep analysis using advanced metrics (Memory, CPU and System, Filesystem and Disk, Networking)
    * Links and data links are provided for better navigation between views

# 0.0.2 - August 2023

* Add regex filter for logs datasource

# 0.0.1 - April 2023

* Initial release

Cost

By connecting your Docker Desktop instance to Grafana Cloud, you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see Active series and dpm usage and Cloud tier pricing.