From: Marc Fournier Date: Wed, 16 Nov 2016 09:10:10 +0000 (+0100) Subject: contrib/docker: add instructions to README X-Git-Tag: collectd-5.8.0~301^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=422c3bb3be01a222466db41a744dcdcb7f6963fd;p=collectd.git contrib/docker: add instructions to README --- diff --git a/contrib/README b/contrib/README index 897d6197..e5c7e36a 100644 --- a/contrib/README +++ b/contrib/README @@ -44,6 +44,21 @@ should look something like this: datadir: "/var/lib/collectd/rrd/" libdir: "/usr/lib/collectd/" +docker/ +------- +Sample docker setup using an LD_PRELOAD wrapper to redirect system calls +accessing /proc and /sys to prefixed bind-mounts inside the container. + +Drop your collectd configuration snippets in the +contrib/docker/collectd.conf.d/ directory, and build an image including them: + $ docker build -t my_collectd ./contrib/docker/ + +Then run it with the required bind-mounts: + $ docker run -it --rm \ + -v /proc:/rootfs/proc:ro -v /sys:/rootfs/sys:ro \ + --name collectd my_collectd + $ docker exec -it collectd collectdctl listval + exec-munin.px ------------- Script to be used with the exec-plugin (see collectd-exec(5) for details)