2022-06-02 13:19:11 -04:00
|
|
|
# Node-Exporter
|
|
|
|
|
|
|
|
This is a copy of [prom/node-exporter](https://hub.docker.com/r/prom/node-exporter) which also add's the hostname metric.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2022-06-02 15:09:23 -04:00
|
|
|
For the hostname to be detected, you must mount the host's `rootfs` into the container's `/host` directory as seen here:
|
2022-06-02 13:19:11 -04:00
|
|
|
|
|
|
|
```
|
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
|
|
|
node-exporter:
|
|
|
|
image: ztimson/node-exporter:latest
|
|
|
|
command:
|
|
|
|
- --path.rootfs=/host
|
|
|
|
volumes:
|
|
|
|
- /:/host:ro,rslave
|
|
|
|
networks:
|
|
|
|
- network
|
|
|
|
deploy:
|
|
|
|
mode: global
|
|
|
|
```
|