diff options
author | Wei Wei <weiwei.inf@gmail.com> | 2017-10-11 17:18:30 +0800 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2017-10-11 11:18:30 +0200 |
commit | 1e4af2125620a755e0c9c24431b30803903cbaf2 (patch) | |
tree | 1892ff1974d4022c8063e97037dfb7a784b89a43 /README.md | |
parent | 6e2053c557f96efb63aef3691f15335a70baaffd (diff) | |
download | prometheus_node_collector-1e4af2125620a755e0c9c24431b30803903cbaf2.tar.bz2 prometheus_node_collector-1e4af2125620a755e0c9c24431b30803903cbaf2.tar.xz prometheus_node_collector-1e4af2125620a755e0c9c24431b30803903cbaf2.zip |
add rslave for docker example, so node_exporter can receive host mount/unmount events (#660)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -131,6 +131,20 @@ If you need to run it on Docker, you can deploy this exporter using the | |||
131 | image](https://quay.io/repository/prometheus/node-exporter) with the following | 131 | image](https://quay.io/repository/prometheus/node-exporter) with the following |
132 | options and bind-mounts: | 132 | options and bind-mounts: |
133 | 133 | ||
134 | for docker version >= 1.10 | ||
135 | ```bash | ||
136 | docker run -d -p 9100:9100 \ | ||
137 | -v "/proc:/host/proc:ro" \ | ||
138 | -v "/sys:/host/sys:ro" \ | ||
139 | -v "/:/rootfs:ro,rslave" \ | ||
140 | --net="host" \ | ||
141 | quay.io/prometheus/node-exporter \ | ||
142 | --path.procfs /host/proc \ | ||
143 | --path.sysfs /host/sys \ | ||
144 | --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)" | ||
145 | ``` | ||
146 | |||
147 | for docker version < 1.10 | ||
134 | ```bash | 148 | ```bash |
135 | docker run -d -p 9100:9100 \ | 149 | docker run -d -p 9100:9100 \ |
136 | -v "/proc:/host/proc:ro" \ | 150 | -v "/proc:/host/proc:ro" \ |