diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2023-01-16 15:02:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 15:02:39 +0200 |
commit | a14a21f90f7f38ff2b71eb3bc0b442d240c09fd6 (patch) | |
tree | 18c796b007e858fc200a03a46caf1d4c9e305105 /system | |
parent | 7d0ca0b83e96fdebed5e66b73362ece4fa0ad62e (diff) |
fix(pacakging): fix cpu/memory metrics when running inside LXC container as systemd service (#14255)
Fixes https://github.com/netdata/netdata/issues/14238
Diffstat (limited to 'system')
-rw-r--r-- | system/netdata.service.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/system/netdata.service.in b/system/netdata.service.in index 7af84e63c8..25d95b2b81 100644 --- a/system/netdata.service.in +++ b/system/netdata.service.in @@ -71,6 +71,10 @@ ProtectControlGroups=on ReadWriteDirectories=/run/netdata # This is needed to make email-based alert deliver work if Postfix is the email provider on the system. ReadWriteDirectories=-/var/spool/postfix/maildrop +# LXCFS directories (https://github.com/lxc/lxcfs#lxcfs) +# If we don't set them explicitly, systemd mounts procfs from the host. See https://github.com/netdata/netdata/issues/14238. +BindReadOnlyPaths=-/proc/cpuinfo -/proc/diskstats -/proc/loadavg -/proc/meminfo +BindReadOnlyPaths=-/proc/stat -/proc/swaps -/proc/uptime -/proc/slabinfo [Install] WantedBy=multi-user.target |