Public | Automated Build

Last pushed: 2 months ago
Short Description
Collectd Docker image with write_atsd plugin
Full Description

Collectd Docker Image

This image provides a Dockerized collectd configuration to gather operating system statistics from the underlying Docker host instead of a container where it's launched.

The collectd agent started within the container is automatically configured to send metrics into an Axibase Time Series Database instance using the write_atsd plugin.

The target ATSD instance is specified in the --atsd-url argument.

Prepare Image

Docker Hub

docker pull axibase/collectd

Build Image from Sources

  • Download Dockerfile to a Docker host connected to

  • Build image

docker build -t axibase/collectd .

Download Image

  • Download a pre-built image file from

  • Import the image into the Docker host

docker load < docker-axibase-collectd.tar.gz

Start Container

Basic Configuration

  • Start Docker container
docker run -d -v /:/rootfs:ro --pid=host --net=host \
    --name=collectd axibase/collectd \
    --atsd-url=tcp://atsd_host:tcp_port \
  • The fqdn option is used to set Collectd FQDNLookup setting. It controls how a hostname is chosen. When enabled, the hostname of the node is set to the fully qualified domain name

lvs Configuration

This configuration reads lvs command output and therefore must be launched with elevated privileges. The collected data is useful when docker is configured in direct-lvm mode.

docker run -d -v /:/rootfs:ro --privileged=true \
    --pid=host --net=host \
    --name=collectd axibase/collectd \
    --atsd-url=tcp://atsd_host:tcp_port \
    --fqdn=false \

The lvs output is processed with script, invoked by the collectd's native exec plugin. The script reads the output into a tabular structure and generates PUTVAL commands containing LVM statistics for each logical volume:

PUTVAL nurswgdkr001/exec-lvs-data%/gauge-volume_group=vg0;logical_volume=thinpool N:4.52



If there are some problems grep collectd logs for errors to find out the reason:

docker exec -it collectd cat /var/log/collectd.log | grep error
Docker Pull Command
Source Repository