All tools / Docker Compose examples
Node Exporter with Docker Compose
Prometheus Node Exporter reading the host's CPU, memory, disk and network metrics.
compose.yaml
services:
node-exporter:
image: prom/node-exporter:v1.9.1
restart: unless-stopped
command:
- --path.rootfs=/host
- --web.listen-address=:9100
# Host networking and PID namespace let it report the host's real network and process stats.
network_mode: host
pid: host
volumes:
- /:/host:ro,rslave
How to use it
Commands
docker compose up -d docker compose ps docker compose logs -f
- Point Prometheus at http://<host-ip>:9100/metrics.
Prefer Kubernetes? See the Node Exporter Kubernetes version.