I thought I’d have a go at adding a Netdata accessory to my Kamal deployment. It works quite well. Here’s the config:
netdata:
image: netdata/netdata:latest
role: web
network: host
options:
pid: host
cap-add:
- SYS_PTRACE
- SYS_ADMIN
security-opt:
- apparmor=unconfined
volumes:
- netdataconfig:/etc/netdata
- netdatalib:/var/lib/netdata
- netdatacache:/var/cache/netdata
- /:/host/root:ro,rslave
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /etc/localtime:/etc/localtime:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
- /var/log:/host/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /run/dbus:/run/dbus:ro
Obviously sanity check it for your requirements as it does reach into the host quite deeply. It’s based on their documentation:
In terms of routing, it ends up running on 127.0.0.1:19999 which you can tunnel to using something like cloudflared.