Hi, I’d like to monitor my LXD containers running on Ubuntu 22.04 using the ubuntu-provided netdata package. Netdata works nicely without any manual configuration, except that my containers won’t show up (even though they should according to netdata’s documentation). I’m hesitant to ask on netdata forums since I’m not using upstream packages and for general ubuntu forums this may be too specific.
What I do notice in the logs is lots of cgroup related permission errors. Here’s a sample excerpt of /var/log/netdata/error.log
:
2023-04-11 18:21:33: cgroup-name.sh: INFO: cgroup 'lxc.payload.seafile' is called 'seafile'
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open pid_from_cgroup() file '/sys/fs/cgroup/lxc.payload.seafile/tasks'. (errno 2, No such file or directory)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open pid_from_cgroup() file '/sys/fs/cgroup/lxc.payload.seafile/user.slice/tasks'. (errno 2, No such file or directory)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : setresuid(0, 0, 0) failed. (errno 1, Operation not permitted)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network INFO : MAIN : running: exec /usr/lib/netdata/plugins.d/cgroup-network-helper.sh --cgroup '/sys/fs/cgroup/lxc.payload.seafile'
2023-04-11 18:21:33: cgroup-network-helper.sh: INFO: searching for network interfaces of cgroup '/sys/fs/cgroup/lxc.payload.seafile'
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : child pid 142495 exited with code 1.
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open proc_pid_fd() file '/proc/4521/ns/net' (errno 13, Permission denied)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open proc_pid_fd() file '/proc/4521/ns/pid' (errno 13, Permission denied)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open proc_pid_fd() file '/proc/4521/ns/mnt' (errno 13, Permission denied)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open proc_pid_fd() file '/proc/4521/root' (errno 13, Permission denied)
2023-04-11 18:21:33: /usr/lib/netdata/plugins.d/cgroup-network ERROR : MAIN : Cannot open proc_pid_fd() file '/proc/4521/cwd' (errno 13, Permission denied)
2023-04-11 18:21:33: netdata ERROR : MAIN : child pid 142494 exited with code 1
I’m seeing that netdata is running under its own uid, so it’s probably a missing manual configuration (but I can’t seem to find the relevant documentation) or a packaging issue. Maybe someone encountered the same issue and found a proper solution?