add rslave for docker example, so node_exporter can receive host mount/unmount events (#660)
This commit is contained in:
parent
6e2053c557
commit
1e4af21256
14
README.md
14
README.md
|
@ -131,6 +131,20 @@ If you need to run it on Docker, you can deploy this exporter using the
|
|||
image](https://quay.io/repository/prometheus/node-exporter) with the following
|
||||
options and bind-mounts:
|
||||
|
||||
for docker version >= 1.10
|
||||
```bash
|
||||
docker run -d -p 9100:9100 \
|
||||
-v "/proc:/host/proc:ro" \
|
||||
-v "/sys:/host/sys:ro" \
|
||||
-v "/:/rootfs:ro,rslave" \
|
||||
--net="host" \
|
||||
quay.io/prometheus/node-exporter \
|
||||
--path.procfs /host/proc \
|
||||
--path.sysfs /host/sys \
|
||||
--collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"
|
||||
```
|
||||
|
||||
for docker version < 1.10
|
||||
```bash
|
||||
docker run -d -p 9100:9100 \
|
||||
-v "/proc:/host/proc:ro" \
|
||||
|
|
Loading…
Reference in New Issue