Revert "collectd: Run collectd in privileged container"
Unfortunately, running *collectd* in a container is not going to work.
Although containers can be configured to share some of the host's
namespaces, one notable exception is the mount namespace. Naturally,
containers must have their own mount namespace, which prevents them from
seeing filesystems that are actually mounted on the host. For
*collectd*, this effectively makes the `df` plugin useless, which
ultimately prevents us from monitoring disk space.
This reverts commit 4048e5cc0a
.
parent
5862ff4cc2
commit
b5455e519a
|
@ -1,26 +0,0 @@
|
|||
# vim: set ft=systemd :
|
||||
[Unit]
|
||||
Description=Collectd statistics daemon
|
||||
After=network.target
|
||||
Wants=network.target
|
||||
|
||||
[Container]
|
||||
Image=git.pyrocufflink.net/containerimages/collectd:latest
|
||||
Volume=/etc/collectd.d:/etc/collectd.d:ro
|
||||
Volume=/run:/run:rw
|
||||
Tmpfs=/tmp
|
||||
Network=host
|
||||
SecurityLabelDisable=true
|
||||
PodmanArgs=--privileged
|
||||
PodmanArgs=--ipc=host
|
||||
PodmanArgs=--uts=host
|
||||
PodmanArgs=--pid=host
|
||||
PodmanArgs=--cgroupns=host
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
StartLimitIntervalSec=10s
|
||||
StartLimitBurst=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,13 +1,22 @@
|
|||
variant: fcos
|
||||
version: 1.4.0
|
||||
|
||||
ignition:
|
||||
config:
|
||||
merge:
|
||||
- local: packages.yaml
|
||||
|
||||
storage:
|
||||
files:
|
||||
- path: /etc/containers/systemd/collectd.container
|
||||
- path: /etc/ignition/packages.d/collectd
|
||||
mode: 0644
|
||||
contents:
|
||||
local: collectd.container
|
||||
|
||||
inline: |
|
||||
collectd
|
||||
collectd-chrony
|
||||
collectd-disk
|
||||
collectd-sensors
|
||||
collectd-write_prometheus
|
||||
- path: /etc/collectd.d/df.conf
|
||||
mode: 0644
|
||||
contents:
|
||||
|
@ -18,7 +27,6 @@ storage:
|
|||
FSType overlay
|
||||
IgnoreSelected true
|
||||
</Plugin>
|
||||
|
||||
- path: /etc/collectd.d/plugins.conf
|
||||
mode: 0644
|
||||
contents:
|
||||
|
@ -42,3 +50,8 @@ storage:
|
|||
<Plugin write_prometheus>
|
||||
Port 9103
|
||||
</Plugin>
|
||||
|
||||
systemd:
|
||||
units:
|
||||
- name: collectd.service
|
||||
enabled: true
|
||||
|
|
Loading…
Reference in New Issue