Documentation forAppOptics

Docker

Overview

This plugin collects runtime metrics from the Docker containers and their corresponding host machine. It also gathers information about resource usage and performance characteristics.

Setup

This integration is included as part of a SWI collector. The SWI collector bundles several collectors into one integrated binary.

The docker plugin is included with the SolarWinds Snap Agent by default. This section describes how to enable the plugin for a Snap Agent instance.

With Snap Agent version 4.5.0 and later, this plugin was upgraded to use the v2 plugins framework. If you are running v1 of the collector, see AppOptics Snap Agent 4.4.0 documentation.

To migrate to the v2 plugins framework, update Snap Agent to the latest version and see Migrate from v1 to v2 appoptics publisher plugins.

Prerequisites

This plugin requires that the solarwinds agent user has access to the Docker API provided by the Docker daemon. By default, this daemon binds to a Unix socket owned by root, and is read/writable by the docker group.

To provide the agent access to the API, ensure that the docker group exists, and then add the solarwinds user to the group.

sudo groupadd docker
sudo usermod -aG docker solarwinds
See the Docker post-install documentation for details.

If the Docker daemon is configured to listen on a TCP port, this plugin can query the Docker API over HTTP. See the Docker daemon configuration documentation for details.

To verify that the agent can access the Docker API, run the following command as agent user solarwinds. This pulls and runs a test image in a container.

sudo -u solarwinds docker run hello-world

After you verify the test image, add the Unix or TCP socket in the endpoint configuration setting.

Configuration

To help you get started collecting Docker metrics, the agent includes an example v2 task manifest file with a predefined task configuration. After you enable the task configuration, the Snap Agent loads the plugin when required.

The example file is located at /opt/SolarWinds/Snap/etc/plugins.d/docker.yaml.example.

To enable the task configuration:

  1. Make a copy of the example v2 task manifest file and rename it task-docker.yaml.

    sudo cp -p /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-docker.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-docker.yaml
  2. (Optional) Edit the task-docker.yaml file to match the custom settings in your Linux or Windows system.

    Below is an example manifest file for a Linux system.

    ---
    version: 2
    
    schedule:
      type: cron
      interval: "0 * * * * *"
    
    plugins:
      - plugin_name: swi
      
        config:
          docker:
            ## Set a docker service endpoint. Defaults to: unix:///var/run/docker.sock
            #endpoint: "unix:///var/run/docker.sock"
    
            ## Location of /procfs. Only for linux. Defaults to: /proc
            #procfs: "/proc"
    
            # Run container api stats as stream stats to have real time statistics. The values of stats will be averaged.
            # Setting this option to true would likely increase the CPU usage of the docker daemon process.
            # Defaults to: false
            #stream_stats: false
    
            # Collect metric timeout. Defaults to: 15s
            #timeout: "15s"
            
            ## Set filters for getting interesting containers.
            ## More can be found here: https://docs.docker.com/engine/api/v1.39/#operation/ContainerList
            ## Filters with one 'key' name and more than one value are using as OR, example:
            ## name:
            ##   nginx: true
            ##   oracledb: true
            ## Filters with the different 'key' name are using as AND, example:
            ## name:
            ##   nginx: true
            ## label:
            ##   k8s-logs: true
            ## To see metrics from all existing containers (not only running) set all_containers to true
            ## Defaults to: empty list of filters and all_containers set to false
            #containers_list:
            # filters:
            #   name:
            #     nginx: true
            #     oracledb: true
            #   label:
            #     k8s-logs: true
            # all_containers: true
    
    publish:
      - plugin_name: publisher-appoptics
    
    metrics:
      # for container metrics "container_id" will be replaced with
    "all" keyword
      - /docker/[container_id]/container/count
      - /docker/[container_id]/container/running
      - /docker/[container_id]/container/paused
      - /docker/[container_id]/container/stopped
      - /docker/[container_id]/cpu/cpu_usage/total
      - /docker/[container_id]/cpu/cpu_usage/user_mode
      - /docker/[container_id]/cpu/cpu_usage/usage_percent
      - /docker/[container_id]/cpu/cpu_usage/kernel_mode
      - /docker/[container_id]/memory/statistics/active_anon
      - /docker/[container_id]/memory/statistics/active_file
      - /docker/[container_id]/memory/statistics/cache
      - /docker/[container_id]/memory/statistics/hierarchical_memory_limit
      - /docker/[container_id]/memory/statistics/inactive_anon
      - /docker/[container_id]/memory/statistics/inactive_file
      - /docker/[container_id]/memory/statistics/mapped_file
      - /docker/[container_id]/memory/statistics/pgfault
      - /docker/[container_id]/memory/statistics/pgmajfault
      - /docker/[container_id]/memory/statistics/pgpgin
      - /docker/[container_id]/memory/statistics/pgpgout
      - /docker/[container_id]/memory/statistics/rss
      - /docker/[container_id]/memory/statistics/rss_huge
      - /docker/[container_id]/cpu/throttling_data/nr_periods
      - /docker/[container_id]/cpu/throttling_data/nr_throttled
      - /docker/[container_id]/cpu/throttling_data/throttled_time
      - /docker/[container_id]/memory/usage/max_usage
      - /docker/[container_id]/memory/usage/usage_percent
      - /docker/[container_id]/blkio/io_service_bytes_recursive/total
    - /docker/[container_id]/blkio/io_serviced_recursive/total
    
    # The following will submit aggregated total of metrics from all available network interfaces
      - /docker/[container_id]/network/total/rx_bytes
      - /docker/[container_id]/network/total/rx_dropped
      - /docker/[container_id]/network/total/rx_errors
      - /docker/[container_id]/network/total/rx_packets
      - /docker/[container_id]/network/total/tx_bytes
      - /docker/[container_id]/network/total/tx_dropped
      - /docker/[container_id]/network/total/tx_errors
      - /docker/[container_id]/network/total/tx_packets
    
    # The remaining available metrics
      #- /docker/[container_id]/image/[image_name]/count
      #- /docker/[container_id]/image/[image_name]/running
      #- /docker/[container_id]/image/[image_name]/paused
      #- /docker/[container_id]/image/[image_name]/stopped
      #- /docker/[container_id]/image/[image_name]/oomkilled
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/read
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/write
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/sync
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/async
      #- /docker/[container_id]/blkio/io_serviced_recursive/read
      #- /docker/[container_id]/blkio/io_serviced_recursive/write
      #- /docker/[container_id]/blkio/io_serviced_recursive/sync
      #- /docker/[container_id]/blkio/io_serviced_recursive/async
      #- /docker/[container_id]/blkio/io_queue_recursive/read
      #- /docker/[container_id]/blkio/io_queue_recursive/write
      #- /docker/[container_id]/blkio/io_queue_recursive/sync
      #- /docker/[container_id]/blkio/io_queue_recursive/async
      #- /docker/[container_id]/blkio/io_queue_recursive/total
      #- /docker/[container_id]/blkio/io_service_time_recursive/read
      #- /docker/[container_id]/blkio/io_service_time_recursive/write
      #- /docker/[container_id]/blkio/io_service_time_recursive/sync
      #- /docker/[container_id]/blkio/io_service_time_recursive/async
      #- /docker/[container_id]/blkio/io_service_time_recursive/total
      #- /docker/[container_id]/blkio/io_wait_time_recursive/read
      #- /docker/[container_id]/blkio/io_wait_time_recursive/write
      #- /docker/[container_id]/blkio/io_wait_time_recursive/sync
      #- /docker/[container_id]/blkio/io_wait_time_recursive/async
      #- /docker/[container_id]/blkio/io_wait_time_recursive/total
      #- /docker/[container_id]/blkio/io_merged_recursive/read
      #- /docker/[container_id]/blkio/io_merged_recursive/write
      #- /docker/[container_id]/blkio/io_merged_recursive/sync
      #- /docker/[container_id]/blkio/io_merged_recursive/async
      #- /docker/[container_id]/blkio/io_merged_recursive/total
      #- /docker/[container_id]/blkio/io_time_recursive/read
      #- /docker/[container_id]/blkio/io_time_recursive/write
      #- /docker/[container_id]/blkio/io_time_recursive/sync
      #- /docker/[container_id]/blkio/io_time_recursive/async
      #- /docker/[container_id]/blkio/io_time_recursive/total
      #- /docker/[container_id]/blkio/sectors_recursive/read
      #- /docker/[container_id]/blkio/sectors_recursive/write
      #- /docker/[container_id]/blkio/sectors_recursive/sync
      #- /docker/[container_id]/blkio/sectors_recursive/async
      #- /docker/[container_id]/blkio/sectors_recursive/total
      #- /docker/[container_id]/connection/tcp/established
      #- /docker/[container_id]/connection/tcp/syn_sent
      #- /docker/[container_id]/connection/tcp/syn_recv
      #- /docker/[container_id]/connection/tcp/fin_wait1
      #- /docker/[container_id]/connection/tcp/fin_wait2
      #- /docker/[container_id]/connection/tcp/time_wait
      #- /docker/[container_id]/connection/tcp/close
      #- /docker/[container_id]/connection/tcp/close_wait
      #- /docker/[container_id]/connection/tcp/last_ack
      #- /docker/[container_id]/connection/tcp/listen
      #- /docker/[container_id]/connection/tcp/closing
      #- /docker/[container_id]/connection/tcp6/established
      #- /docker/[container_id]/connection/tcp6/syn_sent
      #- /docker/[container_id]/connection/tcp6/syn_recv
      #- /docker/[container_id]/connection/tcp6/fin_wait1
      #- /docker/[container_id]/connection/tcp6/fin_wait2
      #- /docker/[container_id]/connection/tcp6/time_wait
      #- /docker/[container_id]/connection/tcp6/close
      #- /docker/[container_id]/connection/tcp6/close_wait
      #- /docker/[container_id]/connection/tcp6/last_ack
      #- /docker/[container_id]/connection/tcp6/listen
      #- /docker/[container_id]/connection/tcp6/closing
      #- /docker/[container_id]/cpu/cpu_usage/per_cpu/[cpu_id]
      #- /docker/[container_id]/cpu/cpu_shares
      #- /docker/[container_id]/cpuset/cpus
      #- /docker/[container_id]/cpuset/mems
      #- /docker/[container_id]/cpuset/memory_migrate
      #- /docker/[container_id]/cpuset/cpu_exclusive
      #- /docker/[container_id]/cpuset/memory_exclusive
      #- /docker/[container_id]/filesystem/[device_name]/device_name
      #- /docker/[container_id]/filesystem/[device_name]/type
      #- /docker/[container_id]/filesystem/[device_name]/capacity
      #- /docker/[container_id]/filesystem/[device_name]/usage
      #- /docker/[container_id]/filesystem/[device_name]/base_usage
      #- /docker/[container_id]/filesystem/[device_name]/available
      #- /docker/[container_id]/filesystem/[device_name]/inodes_free
      #- /docker/[container_id]/filesystem/[device_name]/reads_completed
      #- /docker/[container_id]/filesystem/[device_name]/reads_merged
      #- /docker/[container_id]/filesystem/[device_name]/sectors_read
      #- /docker/[container_id]/filesystem/[device_name]/read_time
      #- /docker/[container_id]/filesystem/[device_name]/writes_completed
      #- /docker/[container_id]/filesystem/[device_name]/writes_merged
      #- /docker/[container_id]/filesystem/[device_name]/sectors_written
      #- /docker/[container_id]/filesystem/[device_name]/write_time
      #- /docker/[container_id]/filesystem/[device_name]/io_in_progress
      #- /docker/[container_id]/filesystem/[device_name]/io_time
      #- /docker/[container_id]/filesystem/[device_name]/weighted_io_time
      #- /docker/[container_id]/hugetlb/[page_size]/usage
      #- /docker/[container_id]/hugetlb/[page_size]/max_usage
      #- /docker/[container_id]/hugetlb/[page_size]/failcnt
      #- /docker/[container_id]/memory/cache
      #- /docker/[container_id]/memory/usage/failcnt
      #- /docker/[container_id]/memory/usage/limit
      #- /docker/[container_id]/memory/usage/usage
      #- /docker/[container_id]/memory/swap_usage/failcnt
      #- /docker/[container_id]/memory/swap_usage/limit
      #- /docker/[container_id]/memory/swap_usage/max_usage
      #- /docker/[container_id]/memory/swap_usage/usage
      #- /docker/[container_id]/memory/swap_usage/usage_percent
      #- /docker/[container_id]/memory/kernel_usage/failcnt
      #- /docker/[container_id]/memory/kernel_usage/limit
      #- /docker/[container_id]/memory/kernel_usage/max_usage
      #- /docker/[container_id]/memory/kernel_usage/usage
      #- /docker/[container_id]/memory/kernel_usage/usage_percent
      #- /docker/[container_id]/memory/statistics/total_inactive_anon
      #- /docker/[container_id]/memory/statistics/total_pgfault
      #- /docker/[container_id]/memory/statistics/total_pgmajfault
      #- /docker/[container_id]/memory/statistics/total_pgpgin
      #- /docker/[container_id]/memory/statistics/total_rss_huge
      #- /docker/[container_id]/memory/statistics/total_active_file
      #- /docker/[container_id]/memory/statistics/working_set
      #- /docker/[container_id]/memory/statistics/total_dirty
      #- /docker/[container_id]/memory/statistics/total_unevictable
      #- /docker/[container_id]/memory/statistics/total_active_anon
      #- /docker/[container_id]/memory/statistics/total_mapped_file
      #- /docker/[container_id]/memory/statistics/writeback
      #- /docker/[container_id]/memory/statistics/total_pgpgout
      #- /docker/[container_id]/memory/statistics/dirty
      #- /docker/[container_id]/memory/statistics/hierarchical_memsw_limit
      #- /docker/[container_id]/memory/statistics/unevictable
      #- /docker/[container_id]/memory/statistics/total_cache
      #- /docker/[container_id]/memory/statistics/total_inactive_file
      #- /docker/[container_id]/memory/statistics/total_rss
      #- /docker/[container_id]/memory/statistics/total_swap
      #- /docker/[container_id]/memory/statistics/swap
      #- /docker/[container_id]/memory/statistics/total_writeback
      #- /docker/[container_id]/network/[network_interface]/rx_bytes
      #- /docker/[container_id]/network/[network_interface]/rx_packets
      #- /docker/[container_id]/network/[network_interface]/rx_errors
      #- /docker/[container_id]/network/[network_interface]/rx_dropped
      #- /docker/[container_id]/network/[network_interface]/tx_bytes
      #- /docker/[container_id]/network/[network_interface]/tx_packets
      #- /docker/[container_id]/network/[network_interface]/tx_errors
      #- /docker/[container_id]/network/[network_interface]/tx_dropped
      #- /docker/[container_id]/pids/current
      #- /docker/[container_id]/pids/limit
      #- /docker/[container_id]/spec/status
      #- /docker/[container_id]/spec/creation_time
      #- /docker/[container_id]/spec/image_name
      #- /docker/[container_id]/spec/size_rw
      #- /docker/[container_id]/spec/size_root_fs
      #- /docker/[container_id]/spec/labels/[label_name]

    Below is an example manifest file for a Windows system.

    ---
    version: 2
    schedule:
      type: cron
      interval: "0 * * * * *"
    
    plugins:
      - plugin_name: swi
    
    config:
      docker:
        ## Set a docker service endpoint. Defaults to: npipe:////./pipe/docker_engine
        #endpoint: "npipe:////./pipe/docker_engine"
    
        # Run container api stats as stream stats to have real time statistics. The values of stats will be averaged.
        # Setting this option to true would likely increase the CPU usage of the docker daemon process.
        # Defaults to: false
        #stream_stats: false
        
        # Collect metric timeout. Defaults to: 15s
        #timeout: "15s"
    
        ## Set filters for getting interesting containers.
        ## More can be found here: https://docs.docker.com/engine/api/v1.39/#operation/ContainerList
        ## Filters with one 'key' name and more than one value are using as OR, example:
        ## name:
        ##   nginx: true
        ##   oracledb: true
        ## Filters with the different 'key' name are using as AND, example:
        ## name:
        ##   nginx: true
        ## label:
        ##   k8s-logs: true
        ## To see metrics from all existing containers (not only running) set all_containers to true
        ## Defaults to: empty list of filters and all_containers set to false
        #containers_list:
        # filters:
        #   name:
        #     nginx: true
        #     oracledb: true
        #   label:
        #     k8s-logs: true
        # all_containers: true
    
      publish:
        - plugin_name: publisher-appoptics
      metrics:
        # for container metrics "container_id" will be replaced with "all" keyword
      - /docker/[container_id]/container/count
      - /docker/[container_id]/container/running
      - /docker/[container_id]/container/paused
      - /docker/[container_id]/container/stopped
      - /docker/[container_id]/cpu/cpu_usage/total
      - /docker/[container_id]/cpu/cpu_usage/user_mode
      - /docker/[container_id]/cpu/cpu_usage/usage_percent
      - /docker/[container_id]/cpu/cpu_usage/kernel_mode
      - /docker/[container_id]/cpu/throttling_data/nr_periods
      - /docker/[container_id]/cpu/throttling_data/nr_throttled
      - /docker/[container_id]/cpu/throttling_data/throttled_time
      - /docker/[container_id]/memory/usage/max_usage
      - /docker/[container_id]/memory/usage/usage_percent
      - /docker/[container_id]/memory/statistics/active_file
      - /docker/[container_id]/memory/statistics/active_anon
      - /docker/[container_id]/memory/statistics/hierarchical_memory_limit
      - /docker/[container_id]/memory/statistics/cache
      - /docker/[container_id]/memory/statistics/inactive_file
      - /docker/[container_id]/memory/statistics/inactive_anon
      - /docker/[container_id]/memory/statistics/mapped_file
      - /docker/[container_id]/memory/statistics/pgmajfault
      - /docker/[container_id]/memory/statistics/pgfault
      - /docker/[container_id]/memory/statistics/pgpgin
      - /docker/[container_id]/memory/statistics/pgpgout
      - /docker/[container_id]/memory/statistics/rss
      - /docker/[container_id]/memory/statistics/rss_huge
      - /docker/[container_id]/blkio/io_service_bytes_recursive/total
      - /docker/[container_id]/blkio/io_serviced_recursive/total
      # The following will submit aggregated total of metrics fromall available network interfaces
      - /docker/[container_id]/network/total/rx_bytes
      - /docker/[container_id]/network/total/rx_dropped
      - /docker/[container_id]/network/total/rx_errors
      - /docker/[container_id]/network/total/rx_packets
      - /docker/[container_id]/network/total/tx_bytes
      - /docker/[container_id]/network/total/tx_dropped
      - /docker/[container_id]/network/total/tx_errors
      - /docker/[container_id]/network/total/tx_packets
      # The remaining available metrics
      #- /docker/[container_id]/image/[image_name]/count
      #- /docker/[container_id]/image/[image_name]/running
      #- /docker/[container_id]/image/[image_name]/paused
      #- /docker/[container_id]/image/[image_name]/stopped
      #- /docker/[container_id]/image/[image_name]/oomkilled
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/read
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/write
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/sync
      #- /docker/[container_id]/blkio/io_service_bytes_recursive/async
      #- /docker/[container_id]/blkio/io_serviced_recursive/read
      #- /docker/[container_id]/blkio/io_serviced_recursive/write
      #- /docker/[container_id]/blkio/io_serviced_recursive/sync
      #- /docker/[container_id]/blkio/io_serviced_recursive/async
      #- /docker/[container_id]/blkio/io_queue_recursive/read
      #- /docker/[container_id]/blkio/io_queue_recursive/write
      #- /docker/[container_id]/blkio/io_queue_recursive/sync
      #- /docker/[container_id]/blkio/io_queue_recursive/async
      #- /docker/[container_id]/blkio/io_queue_recursive/total
      #- /docker/[container_id]/blkio/io_service_time_recursive/read
      #- /docker/[container_id]/blkio/io_service_time_recursive/write
      #- /docker/[container_id]/blkio/io_service_time_recursive/sync
      #- /docker/[container_id]/blkio/io_service_time_recursive/async
      #- /docker/[container_id]/blkio/io_service_time_recursive/total
      #- /docker/[container_id]/blkio/io_wait_time_recursive/read
      #- /docker/[container_id]/blkio/io_wait_time_recursive/write
      #- /docker/[container_id]/blkio/io_wait_time_recursive/sync
      #- /docker/[container_id]/blkio/io_wait_time_recursive/async
      #- /docker/[container_id]/blkio/io_wait_time_recursive/total
      #- /docker/[container_id]/blkio/io_merged_recursive/read
      #- /docker/[container_id]/blkio/io_merged_recursive/write
      #- /docker/[container_id]/blkio/io_merged_recursive/sync
      #- /docker/[container_id]/blkio/io_merged_recursive/async
      #- /docker/[container_id]/blkio/io_merged_recursive/total
      #- /docker/[container_id]/blkio/io_time_recursive/read
      #- /docker/[container_id]/blkio/io_time_recursive/write
      #- /docker/[container_id]/blkio/io_time_recursive/sync
      #- /docker/[container_id]/blkio/io_time_recursive/async
      #- /docker/[container_id]/blkio/io_time_recursive/total
      #- /docker/[container_id]/blkio/sectors_recursive/read
      #- /docker/[container_id]/blkio/sectors_recursive/write
      #- /docker/[container_id]/blkio/sectors_recursive/sync
      #- /docker/[container_id]/blkio/sectors_recursive/async
      #- /docker/[container_id]/blkio/sectors_recursive/total
      #- /docker/[container_id]/cpu/cpu_usage/per_cpu/[cpu_id]
      #- /docker/[container_id]/memory/cache
      #- /docker/[container_id]/memory/usage/failcnt
      #- /docker/[container_id]/memory/usage/limit
      #- /docker/[container_id]/memory/usage/usage
      #- /docker/[container_id]/memory/statistics/total_inactive_anon3
      #- /docker/[container_id]/memory/statistics/total_pgfault
      #- /docker/[container_id]/memory/statistics/total_pgmajfault
      #- /docker/[container_id]/memory/statistics/total_pgpgin
      #- /docker/[container_id]/memory/statistics/total_rss_huge
      #- /docker/[container_id]/memory/statistics/total_active_file
      #- /docker/[container_id]/memory/statistics/working_set
      #- /docker/[container_id]/memory/statistics/total_dirty
      #- /docker/[container_id]/memory/statistics/total_unevictable
      #- /docker/[container_id]/memory/statistics/total_active_anon
      #- /docker/[container_id]/memory/statistics/total_mapped_file
      #- /docker/[container_id]/memory/statistics/writeback
      #- /docker/[container_id]/memory/statistics/total_pgpgout
      #- /docker/[container_id]/memory/statistics/dirty
      #- /docker/[container_id]/memory/statistics/hierarchical_memsw_limit
      #- /docker/[container_id]/memory/statistics/unevictable
      #- /docker/[container_id]/memory/statistics/total_cache
      #- /docker/[container_id]/memory/statistics/total_inactive_file
      #- /docker/[container_id]/memory/statistics/total_rss
      #- /docker/[container_id]/memory/statistics/total_swap
      #- /docker/[container_id]/memory/statistics/swap
      #- /docker/[container_id]/memory/statistics/total_writeback
      #- /docker/[container_id]/network/[network_interface]/rx_bytes
      #- /docker/[container_id]/network/[network_interface]/rx_packets
      #- /docker/[container_id]/network/[network_interface]/rx_errors
      #- /docker/[container_id]/network/[network_interface]/rx_dropped
      #- /docker/[container_id]/network/[network_interface]/tx_bytes
      #- /docker/[container_id]/network/[network_interface]/tx_packets
      #- /docker/[container_id]/network/[network_interface]/tx_errors
      #- /docker/[container_id]/network/[network_interface]/tx_dropped
      #- /docker/[container_id]/pids/current
      #- /docker/[container_id]/pids/limit
      #- /docker/[container_id]/spec/status
      #- /docker/[container_id]/spec/creation_time
      #- /docker/[container_id]/spec/image_name
      #- /docker/[container_id]/spec/size_rw
      #- /docker/[container_id]/spec/size_root_fs
      #- /docker/[container_id]/spec/labels/[label_name]

    The endpoint key is a required setting; on Linux it defaults to:

    unix:///var/run/docker.sock

    Set this key to the Docker API endpoint. To point to a specific host or port, set the endpoint key's value to the correct host or port. For example:

    tcp://docker:2375

    The procfs key is a required setting and defaults to /proc. Set this key to the proc file system path of the Docker host. To collect specific Docker metrics, the agent user solarwinds requires read access to the corresponding proc file system data. If this value is not set properly, the integration will fail to collect most of the metrics.

    The interval key is optional and defaults to 60s. It sets the time interval between the subsequent metrics submissions. This value should never be changed.

    The all_containers key is optional and defaults to false. If set to true, the collector processes the metrics for all running and non-running containers. This may result in sending additional metrics, depending on your docker environment. For details, see List containers and locate the all parameter.

  3. Restart the agent.

    sudo service swisnapd restart
  4. Enable the Docker plugin in the AppOptics user interface.

    When this procedure is completed successfully, the Docker plugin is available on the Integrations page. Select the Docker plugin to open the configuration menu in the user interface and enable the plugin. You should see the docker metrics reported to your dashboard. If the plugin is not available, see Troubleshooting Linux.

Metrics and tags

The following tables outline the default set of metrics collected by the docker plugin, including the optional available metrics.

CPU and memory metrics

Namespace Description
docker.cpu.cpu_usage.total Total consumed CPU time
docker.cpu.cpu_usage.kernel_mode CPU time consumed by tasks in system (kernel) mode
docker.cpu.cpu_usage.user_mode CPU time consumed by tasks in user mode
docker.cpu.cpu_usage.usage_percent Host CPU percentage used by the container
docker.cpu.throttling_data.nr_periods Number of elapsed period intervals
docker.cpu.throttling_data.nr_throttled Number of times tasks in a cgroup were throttled
docker.cpu.throttling_data.throttled_time Total time duration that tasks in a cgroup were throttled
docker.memory.usage.max_usage Maximum memory used by processes in the cgroup
docker.memory.usage.usage_percent Percentage of container memory
docker.memory.statistics.active_anon Anon and swap cache memory on the active LRU list (in bytes)
docker.memory.statistics.active_file File-backed memory on the active LRU list (in bytes)
docker.memory.statistics.cache Page cache memory (in bytes)
docker.memory.statistics.hierarchical_memory_limit Memory limit for the cgroup (in bytes)
docker.memory.statistics.inactive_anon Anon and swap cache memory in the inactive LRU list (in bytes)
docker.memory.statistics.inactive_file File-backed memory in the inactive LRU list (in bytes)
docker.memory.statistics.mapped_file Mapped file (in bytes, including tmpfs.shmem)
docker.memory.statistics.pgfault Number of page faults that occurred since creating the cgroup
docker.memory.statistics.pgmajfault Number of page major faults that occurred since creating the cgroup
docker.memory.statistics.pgpgin Number of charging events to the memory cgroup
docker.memory.statistics.pgpgout Number of uncharging events to the memory cgroup
docker.memory.statistics.rss Anonymous and swap cache memory (in bytes)
docker.memory.statistics.rss_huge Anonymous transparent hugepages (in bytes)

CPU and memory metric tags

Tag Name Description
creation_time Container start time.
docker_id First 12 characters of the Docker container ID.
full_id Docker container ID.
hostname

Name of the host.

Instead of using this tag, SolarWinds recommend using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status.

Blkio metrics

Namespace Description
docker.blkio.io_service_bytes_recursive Bytes transferred to and from the disk from all descendant cgroups2 groups
docker.blkio.io_service_time_recursive Total time between request dispatch and request completion for the I/O done from all descendant cgroups2 groups

Blkio metric tags

Tag Name Description
creation_time Container start time.
docker_id First 12 characters of the Docker container ID.
full_id Docker container ID.
hostname

Host name.

Instead of using this tag. SolarWinds using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status.
major Major device number.
minor Minor device number.
operation Operation type.

Network metrics

Namespace Description
docker.network.<interface>.rx_bytes Number of bytes received over the network
docker.network.<interface>.rx_dropped Number of bytes dropped while received over the network
docker.network.<interface>.rx_errors Number of errors received over the network
docker.network.<interface>.rx_packets Number of packets received over the network
docker.network.<interface>.tx_bytes Number of bytes sent over the network
docker.network.<interface>.tx_dropped Number of bytes dropped while sent over the network
docker.network.<interface>.tx_errors Number of packets sent over the network
docker.network.<interface>.tx_packets Number of errors received over the network

Network metric tags

Tag Name Description
creation_time Container start time.
docker_id First 12 characters of the Docker container ID.
full_id Docker container ID.
hostname

Host name.

Instead of using this tag, SolarWinds recommends using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status.
network_interface Network interface.

Container metrics

Namespace Description
docker.container.count Number of total containers
docker.container.paused Number of paused containers
docker.container.running Number of running containers
docker.container.stopped Number of shipped containers

Container metric tags

Tag Name Description
hostname

Host name.

Instead of using this tag, SolarWinds recommends using the @host alias.

Image metrics

Namespace Description
docker.image.count Number of total images
docker.image.paused Number of paused images
docker.image.running Number of running images
docker.image.stopped Number of stopped images
docker.image.oomkilled Number of oomkilled images

Image metrics tags

Namespace Description
hostname

Host name.

Instead of using this tag, SolarWinds recommends using the host alias.

docker_id First 12 characters of the Docker container ID.
full_id Docker container ID.
image_name Name of the docker image the container was created from.

Optional metrics

You can activate the optional metrics by editing the yaml task . See SolarWinds Snap Agent Task File for details.

Connection, cpu, cpuset, memory, pids, and spec metrics

Namespace Description
docker.connection.tcp.close Number of TCP connections in the Close state
docker.connection.tcp.close_wait Number of TCP connections in the Close_Wait state
docker.connection.tcp.closing Number of TCP connections in the Closing state
docker.connection.tcp.established Number of TCP connections in the Established state
docker.connection.tcp.fin_wait1 Number of TCP connections in the Fin_Wait1 state
docker.connection.tcp.fin_wait2 Number of TCP connections in the Fin_Wait2 state
docker.connection.tcp.last_ack Number of TCP connections in the Listen_Ack state
docker.connection.tcp.syn_recv Number of TCP connections in the Syn_Recv state
docker.connection.tcp.syn_sent Number of TCP connections in the Syn_Sent state
docker.connection.tcp.time_wait Number of TCP connections in the Time_Wait state
docker.connection.tcp6.close Number of TCP6 connections in the Close state
docker.connection.tcp6.close_wait Number of TCP6 connections in the Close_Wait state
docker.connection.tcp6.closing Number of TCP6 connections in the Closing state
docker.connection.tcp6.established Number of TCP6 connections in the Established state
docker.connection.tcp6.fin_wait1 Number of TCP6 connections in the Fin_Wait1 state
docker.connection.tcp6.fin_wait2 Number of TCP6 connections in the Fin_Wait2 state
docker.connection.tcp6.last_ack Number of TCP6 connections in the Listen_Ack state
docker.connection.tcp6.syn_recv Number of TCP6 connections in the Syn_Recv state
docker.connection.tcp6.syn_sent Number of TCP6 connections in the Syn_Sent state
docker.connection.tcp6.time_wait Number of TCP6 connections in the Time_Wait state
docker.cpu.cpu_shares Relative share of CPU time available to the tasks in a cgroup
docker.cpu.cpu_usage.per_cpu.<n>.value CPU time consumed on each nth CPU by all tasks 1
docker.cpuset.cpu_exclusive Flag (0 or 1) that specifies whether other cpusets and its parents and children can share the CPUs for this cpuset
docker.cpuset.cpus CPUs numbers that tasks in this cgroup are permitted to access
docker.cpuset.memory_exclusive Flag (0 or 1) that specifies whether other cpusets can share the memory nodes specified for the cpuset
docker.cpuset.memory_migrate Flag (0 or 1) that specifies whether a page in memory should migrate to a new node if the values in cpuset.mems change
docker.cpuset.mems Memory nodes that tasks in this cgroup are permitted to access
docker.memory.cache Page cache including tmpfs
docker.memory.kernel_usage.failcnt Number of times the kernel memory allocation reaches the value set in kmem.limit_in_bytes
docker.memory.kernel_usage.max_usage Maximum kernel memory allocation by processes in the cgroup
docker.memory.kernel_usage.usage Total kernel memory allocation by processes in the cgroup
docker.memory.statistics.dirty Number of bytes waiting to be written back to the disk
docker.memory.statistics.hierarchical_memsw_limit Number of bytes of memory+swap limit with regard to hierarchy under which memory cgroup is
docker.memory.statistics.swap Amount of swap currently used by the processes in this cgroup
docker.memory.statistics.total_active_anon Total anon and swap cache memory on the active LRU list (in bytes) 2
docker.memory.statistics.total_active_file Total file-backed memory on the active LRU list (in bytes) 2
docker.memory.statistics.total_cache Total page cache memory (in bytes)2
docker.memory.statistics.total_dirty Data waiting to be written back to the disk (in bytes)2
docker.memory.statistics.total_inactive_anon Total anonymous and swap cache memory on the inactive LRU list (in bytes)2
docker.memory.statistics.total_inactive_file Total file-backed memory on the inactve LRU list (in bytes) 2
docker.memory.statistics.total_mapped_file Total mapped file data (in bytes, including tmpfs.shmem) 2
docker.memory.statistics.total_pgfault Total page faults that occurred since the cgroup was created 2
docker.memory.statistics.total_pgmajfault Total page major faults that occurred since the cgroup was created 2
docker.memory.statistics.total_pgpgin Total charging events to the memory cgroup 2
docker.memory.statistics.total_pgpgout Total uncharging events to the memory cgroup 2
docker.memory.statistics.total_rss Total anonymous and swap cache memory (in bytes) 2
docker.memory.statistics.total_rss_huge Total anonymous transparent huge pages (in bytes) 2
docker.memory.statistics.total_swap Total swap usage (in bytes)2
docker.memory.statistics.total_unevictable Total bytes of memory that cannot be reclaimed 2
docker.memory.statistics.total_writeback Total file.anon cache queued to synch to the disk (in bytes) 2
docker.memory.statistics.unevictable Memory that cannot be reclaimed (in bytes)
docker.memory.statistics.working_set Memory used and not dropped by the kernel (in bytes)
docker.memory.statistics.writeback File.anon cache queued for syncing to the disk (in bytes)
docker.memory.swap_usage.failcnt Number of times the swap space limit reached the valueset in memorysw.limit_in_bytes
docker.memory.swap_usage.max_usage Maximum swap space used by processes in the cgroup
docker.memory.swap_usage.usage Total swap space usage by processes in the cgroup
docker.memory.usage.failcnt Number of times the memory limit reached the value set in memory.limit_in_bytes
docker.memory.usage.usage Total current memory usage by processes in the cgroup
docker.pids.current Current number of PIDs in the cgroup
docker.pids.limit Maximum number of PIDs in the cgroup
docker.spec.creation_time Container start time
docker.spec.size_root_fs Total size (bytes) of all files in the container
docker.spec.size_rw Size of the files created or changed from container the base image. After the container is created, this value should increase as the files are created and modified.

Connection, cpu, cpuset, memory, pids, and spec metric tags

Tag Name Description
creation_time Container start time.
docker_id First 12 characters of the Docker container ID.
full_id Docker container ID.
hostname

Host name.

Instead of using this tag, SolarWinds recommends using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status.

1 docker.cpu.cpu_usage.per_cpu.* metrics also have the cpu_id tag

Hugetlb metrics

Namespace Description
docker.hugetlb.<size>.failcnt Number of allocation failure due to the HugeTLB limit
docker.hugetlb.<size>.max_usage Maximum recorded "hugepagesize" hugetlb usage
docker.hugetlb.<size>.usage Current "hugepagesize" usage

HugeTlb metric tags

Tag Name Description
creation_time Container start time.
docker_id First 12 characters of the Docker container ID
full_id Docker container ID
hostname

Host name.

Instead of using this tag, SolarWinds recommends using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status.
size HugeTlb page size.

Filesystem metrics

Namespace Description
docker.filesystem.<device_name>.available Number of bytes available for a non-root user
docker.filesystem.<device_name>.base_usage Base usage consumed by the container's writable layer
docker.filesystem.<device_name>.capacity Number of bytes consumable by the container
docker.filesystem.<device_name>.device_name Block device name associated with the file system
docker.filesystem.<device_name>.inodes_free Number of available Inodes
docker.filesystem.<device_name>.io_in_progress Number of I/Os currently in progress
docker.filesystem.<device_name>.io_time Number of milliseconds spent performing I/Os
docker.filesystem.<device_name>.read_time Total milliseconds spent reading
docker.filesystem.<device_name>.reads_completed Total reads completed successfully
docker.filesystem.<device_name>.reads_merged Total successful merged reads
docker.filesystem.<device_name>.sectors_read Total sectors read successfully
docker.filesystem.<device_name>.sectors_written Total sectors written successfully
docker.filesystem.<device_name>.type Filesystem type (for example, vfs)
docker.filesystem.<device_name>.usage Number of bytes consumed by the container
docker.filesystem.<device_name>.weighted_io_time Weighted number of milliseconds spent performing I/Os
docker.filesystem.<device_name>.writes_completed Total number of writes completed successfully
docker.filesystem.<device_name>.writes_merged Total number of writes merged successfully

Filesystem metric tags

Tag Name Description
creation_time Container start time
docker_id First 12 characters of the Docker container ID
full_id Docker container ID
hostname

Name of the host.

Instead of using this tag, SolarWinds recommends using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status
device_name Device name

Blkio metrics

Namespace Description
docker.blkio.io_merged_recursive Total number of blkio requests merged into requests belonging from all descendant cgroups2 groups
docker.blkio.io_queue_recursive Total number of requests queued up from all the descendant cgroups 3
docker.blkio.io_serviced_recursive Number of I/Os (bio) issued to the disk from all the descendant cgroups 3
docker.blkio.io_time_recursive Disk time allocated to the cgroup per device (in milliseconds) from the descendant cgroups 3
docker.blkio.io_wait_time_recursive Total time the I/Os for cgroup spent waiting in scheduler queues for service from all the descendant cgroups2 groups
docker.blkio.sectors_recursive Number of sectors transferred to and from the disk from all descendant group2 groups

Blkio metric tags

Tag Name Description
creation_time Container start time.
docker_id First 12 characters of the Docker container ID.
full_id Docker container ID.
hostname

Name of the host.

Instead of using this tag, SolarWinds recommends using the @host alias.

image_name Name of the docker image the container was created from.
status Docker container status.
device_name Device name.
major Major device number.
minor Minor device number.
operation Operation type.

2 Hierarchical version of cgroups counter. In addition to the cgroup’s own value, this includes the sum of all hierarchical children values.

3 Each blkio statistic exposes the read, write, sync, async and total values through the operation tag.

See the Kernel documentation for more information about cgroups.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.