Closed zangaby closed 11 months ago
This issue has been inactive for some time. Please let me know if it's still relevant and need attention or I will close it.
Yes, the issue is still relevant. I assume it is related to the fact that I run docker rootless.
You could try adding additional capabilities to the cAdvisor container to see if that resolves the issue.
cadvisor:
container_name: monitoring-cadvisor
image: gcr.io/cadvisor/cadvisor:v0.47.1
hostname: rpi-cadvisor
restart: unless-stopped
privileged: true
cap_add:
- SYS_PTRACE
- SYS_ADMIN
networks:
- internal
expose:
- 8080
devices:
- /dev/kmsg
volumes:
- /:/rootfs:ro
- /run/user/$(id -u)/docker.sock:/var/run/docker.sock:ro
- /sys:/sys:ro
- ~/.local/share/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
- /etc/machine-id:/etc/machine-id:ro
Thanks, unfortunately I ran into this error:
docker-compose up --force-recreate -d ERROR: Invalid interpolation format for "volumes" option in service "cadvisor": "/run/user/$(id -u)/docker.sock:/var/run/docker.sock:ro"
The error you're encountering is due to the use of shell interpolation ($(id -u)
) in your Docker Compose file, which is not directly supported. You can work around this by using an environment variable. Modify your Docker Compose file as follows:
volumes:
- /run/user/${UID}/docker.sock:/var/run/docker.sock:ro
Then set the UID
environment variable before running docker-compose up
:
export UID=$(id -u)
docker-compose up --force-recreate -d
As a regular user it seems not to work.
export UID=$(id -u) -bash: UID: readonly variable
I tried adding the actual UID on that line and now most of the data on the dashboard is populated, only I/O RX/TX FS is missing.
I'm glad I've helped you, keep looking in this direction for the rest :)
Thanks a lot for your help !
Hello, I just deployed your template and all seems fine except the docker data. I am using Client: Docker Engine - Community Version: 24.0.2 on Linux pi 6.1.21-v7l+ #1642 SMP Mon Apr 3 17:22:30 BST 2023 armv7l GNU/Linux
The only logs from the cadvisor logs are: W0613 19:39:05.043316 1 sysinfo.go:203] Nodes topology is not available, providing CPU topology W0613 19:39:05.046549 1 machine.go:65] Cannot read vendor id correctly, set empty. W0613 19:44:05.173332 1 sysinfo.go:203] Nodes topology is not available, providing CPU topology W0613 19:44:05.180616 1 machine.go:65] Cannot read vendor id correctly, set empty. W0613 19:49:05.169196 1 sysinfo.go:203] Nodes topology is not available, providing CPU topology W0613 19:49:05.172791 1 machine.go:65] Cannot read vendor id correctly, set empty. W0613 19:54:05.167764 1 sysinfo.go:203] Nodes topology is not available, providing CPU topology W0613 19:54:05.170801 1 machine.go:65] Cannot read vendor id correctly, set empty. W0613 19:59:05.168270 1 sysinfo.go:203] Nodes topology is not available, providing CPU topology W0613 19:59:05.172766 1 machine.go:65] Cannot read vendor id correctly, set empty. W0613 20:04:05.166263 1 sysinfo.go:203] Nodes topology is not available, providing CPU topology W0613 20:04:05.176903 1 machine.go:65] Cannot read vendor id correctly, set empty.