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?