Monitoring Docker

Configure the Server Density agent to monitor your Docker install to:

• Collect important metrics regarding the number of containers and the resource usage
• Identify overall server slowdowns caused by docker

The docker (docker.yaml / check has been replaced by docker_daemon (docker_daemon.yaml / The docker check will eventually be deprecated and removed from the agent packages. The instructions below will install the docker_daemon check.

Monitored metrics

  • Container Stats
    • Running Containers
    • Stopped Containers
  • Containers
    • CPU System
    • CPU User
    • Memory RSS
    • Memory Swap
    • Memory Cache

Installing the Docker plugin package

Install the Docker plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-docker

Install the Docker plugin on RHEL/CentOS:

sudo yum install sd-agent-docker

Read more about agent plugins.

Configuring the agent to monitor Docker

Add the sd-agent user to the docker group

usermod -a -G docker sd-agent

Configure /etc/sd-agent/conf.d/docker_daemon.yaml

  # docker_root: /
  # timeout: 10
  # tls: False
  # tls_client_cert: /path/to/client-cert.pem
  # tls_client_key: /path/to/client-key.pem
  # tls_cacert: /path/to/ca.pem
  # tls_verify: True

  - ## Daemon and system configuration
    url: "unix://var/run/docker.sock"
    # collect_container_size: false
    # collect_images_stats: false
    # collect_image_size: false
    # collect_disk_stats: true

Remember that you can uncomment any of the above options if you wish to change them.

Restart the agent

sudo /etc/init.d/sd-agent restart

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

If the agent has been configured correctly you’ll see an output such as:

      - instance #0 [OK]
      - Collected 1 metric, 0 events & 2 service checks

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/ check docker_daemon

Configuring Graphs
Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the Docker metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request


Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.