When _collectd_ calls *statvfs(3)* on paths like
`/host/proc/sys/fs/binfmt_misc` which are configured for auto-mounting,
_systemd_ logs hundreds of messages like these:
```
systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1303 (reader#3)
systemd[1]: proc-sys-fs-binfmt_misc.automount: Automount point already active?
```
Eventually, _collectd_ logs an error:
```
collectd[1132]: statvfs(/host/proc/sys/fs/binfmt_misc) failed: Too many levels of symbolic links
```
This happens on every scrape interval.
To avoid this, we can configure _collectd_ to skip calling *statvfs(3)*
on _autofs_ mount points. Even if it did work correctly, we wouldn't
really want _collectd_ triggering automounts; that would pretty much
defeat the purpose of them.
*collectd* logs to syslog, so its output is lost when it's running in a
container. We can capture messages from it by mounting the journald
syslog socket into the container.
Even with *collectd* configured to report filesystem usage by device, it
still only reports filesystems that are mounted (in its namespace).
Thus, in order for it to report filesystems like `/boot`, these need to
be mounted in the container.
I keep going back-and-forth on whether or not collectd should run in a
container on Fedora CoreOS machines. On the one hand, running it
directly on the host allows it to monitor filesystem usage by mount
point, which is consistent with how non-FCOS machines are monitored.
On the other hand, installing packages on FCOS with `rpm-ostree` is a
nightmare. It's _incredibly_ slow. There's also occasionally issues
installing packages if the base layer has not been updated in a while
and the new packages require an existing package to be updated.
For the NUT server specifically, I have changed my mind again: the
*collectd-nut* package depends on *nut-client*, which in turn depends on
Python. I definitely want to avoid installing Python on the host, but I
do not want to lose the ability to monitor the UPSs via collectd. Using
a container, I can strip out the unnecessary bits of *nut-client* and
avoid installing Python at all. I think that's worth having to monitor
filesystem usage by device instead of by mount point.