Suggested template:
Install NetData on Mac M1 using docker-compose
I used the following docker-compose.yml file:
version: '3'
services:
netdata:
image: netdata/netdata
container_name: netdata
pid: host
network_mode: host
restart: unless-stopped
cap_add:
- SYS_PTRACE
- SYS_ADMIN
security_opt:
- apparmor:unconfined
volumes:
- netdataconfig:/etc/netdata
- netdatalib:/var/lib/netdata
- netdatacache:/var/cache/netdata
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
netdataconfig:
netdatalib:
netdatacache:
Environment/Browser/Agent’s version etc
Mac Ventura 13.6, M1 Macbook Pro
What I expected to happen
Netdata to be running, but instead got errors: here is a snippet of log
netdata | 2023-11-02 21:13:44: cgroup-name.sh: INFO: Running API command: curl --unix-socket "/var/run/docker.sock" http://localhost/containers/908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5/json
netdata | curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn't connect to server
netdata | 2023-11-02 21:13:44: cgroup-name.sh: WARNING: cannot find the name of docker container '908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5'
netdata | 2023-11-02 21:13:44: cgroup-name.sh: INFO: cgroup 'docker_908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5' is called '908883fe1876', labels ''
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network INFO : cgroup-network : Using host prefix directory '/host'
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network INFO : cgroup-network : running: exec /usr/libexec/netdata/plugins.d/cgroup-network-helper.sh --cgroup '/host/sys/fs/cgroup/docker/908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5'
netdata | 2023-11-02 21:13:44: cgroup-network-helper.sh: INFO: searching for network interfaces of cgroup '/host/sys/fs/cgroup/docker/908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5'
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network ERROR : cgroup-network : child pid 714710 exited with code 1.
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network ERROR : cgroup-network : Cannot read '/host/sys/class/net/services1/ifindex'. (errno 2, No such file or directory)
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network ERROR : cgroup-network : Cannot read '/host/sys/class/net/services1/iflink'. (errno 2, No such file or directory)
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network ERROR : cgroup-network : Cannot read '/host/sys/class/net/docker1/ifindex'. (errno 2, No such file or directory)
netdata | 2023-11-02 21:13:44: /usr/libexec/netdata/plugins.d/cgroup-network ERROR : cgroup-network : Cannot read '/host/sys/class/net/docker1/iflink'. (errno 2, No such file or directory)
netdata | 2023-11-02 21:13:44: cgroup-name.sh: INFO: Running API command: curl --unix-socket "/var/run/docker.sock" http://localhost/containers/908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5/json
netdata | curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn't connect to server
netdata | 2023-11-02 21:13:44: cgroup-name.sh: WARNING: cannot find the name of docker container '908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5'
netdata | 2023-11-02 21:13:44: cgroup-name.sh: INFO: cgroup 'docker_908883fe187608bfb1d8d437857690cc34e2e51e105231b461a8608c3385aaf5_init.scope' is called '908883fe1876', labels ''
netdata | 2023-11-02 21:13:44: cgroup-name.sh: INFO: Running API command: curl --unix-socket "/var/run/docker.sock" http://localhost/containers/b63211095952687bcd19a4b7c7a120f7ccedbaed1acc419de969b157bbae62ce/json
netdata | curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn't connect to server