Hi everyone!
I’m in need for some help. ![]()
I’m trying to set up the systemd collector from node_exporter inside a docker container. I can’t figure out what the problem is.
The logs show me this, over and over again:
node_exporter | ts=2025-07-30T13:33:46.548Z caller=collector.go:169 level=error msg="collector failed" name=systemd duration_seconds=5.5409e-05 err="couldn't get dbus connection: dial unix /var/run/dbus/system_bus_socket: connect: no such file or direct
ory"
When I exec into the container and ls the dbus dir I get this:
/ $ ls -la /host/var/run/dbus/
total 0
drwxr-xr-x 2 root root 60 Jul 29 23:33 .
drwxr-xr-x 36 root root 920 Jul 30 11:02 ..
srw-rw-rw- 1 root root 0 Jul 29 23:33 system_bus_socket
So the file is present.
This is my docker-compose file:
node_exporter:
image: quay.io/prometheus/node-exporter:v1.5.0
container_name: node_exporter
command:
- "--path.rootfs=/host"
- "--collector.systemd"
pid: host
restart: unless-stopped
volumes:
- /:/host:ro,rslave
networks:
- monitoring
The rest of node_exporter is working fine.
Does anyone know what I’m missing here?
Any help will be greatly appreciated!