0

I'm trying to monitor my host's disk usage using collectd from within docker. I'm using the df collectd plugin, but I keep getting the message:

collectd[8]: df plugin: cu_mount_getlist failed.
collectd[8]: read-function of plugin `df' failed. Will suspend it for 20.000 seconds.

I'm configuring df like this in collectd.conf:

LoadPlugin "df"
<Plugin df>
  MountPoint "/hostfs"
</Plugin>

And I'm running my container with --privileged:

docker run -v "/:/hostfs:ro" --privileged collectd-statsd

What would cause me to get the error about cu_mount_getlist and how can I fix it?

1 Answers1

0

As can be seen from the collectd source, the function that fails tries to enumerate mounts by reading /etc/mtab which I'm assuming isn't mapped in your container.

Ginnungagap
  • 2,595
  • 10
  • 13