/collectd-docker

CollectD instance running within Docker.

Primary LanguageSmarty

collectd-docker

Simple CollectD instance running within a Docker container, with support to send statistics to either Graphite, Riemann or InfluxDB.

Note - also accepts traffic from StatsD clients on localhost:8125.

Setup

  1. Install Docker.
  2. Pull the latest image from the Docker registry:
docker pull revett/collectd

Build Container

docker build --rm -t facio/collectd .

Usage

Start the container:

docker run --name collectd-docker -d -e CONFIG_TYPE=riemann -e EP_HOST=asimov -e EP_PORT=5555 -v /home/fabiano/dev/collectd-docker/default-collectd.conf:/etc/collectd/collectd.conf facio/collectd

docker run --name collectd-docker -d -v /home/fabiano/dev/collectd-docker/default-collectd.conf:/etc/collectd/collectd.conf facio/collectd

Environment Variables

You must replace the required environment variables within the docker run command shown above:

Required:

  • CONFIG_TYPE
    • Either: graphite, riemann or influxdb
  • EP_HOST
    • IP or hostname for the endpoint.
  • EP_PORT
    • Default: 2003
    • Port for the endpoint.

Optional:

  • HOST_NAME
    • Default: collectd-docker
    • Used to create the namespace.
  • PREFIX
    • Default: local.debug
    • Used to create the namespace.
    • Graphite only.

Namespace

When viewing the metrics within Grafana via Graphite for example, they will come under the following namespace:

{{PREFIX}}.{{HOST_NAME}}.cpu-*

Licence

The MIT License (MIT)

Copyright (c) 2015 Charlie Revett