aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authordavid <snarlysodboxer@users.noreply.github.com>2017-11-02 04:07:40 -0700
committerJohannes 'fish' Ziemke <github@freigeist.org>2017-11-02 12:07:40 +0100
commiteb3a917bd8f414e4e2f0803f715bc3ebfba8efae (patch)
tree4eae1d860938eb6e39f4ac6e86cf217c1cc5ad8a /README.md
parentdefe2f373ccbdcc71fdbe8b2a2b84c379c30bc7d (diff)
downloadprometheus_node_collector-eb3a917bd8f414e4e2f0803f715bc3ebfba8efae.tar.bz2
prometheus_node_collector-eb3a917bd8f414e4e2f0803f715bc3ebfba8efae.tar.xz
prometheus_node_collector-eb3a917bd8f414e4e2f0803f715bc3ebfba8efae.zip
Use host PID namespace in docker example (#672)
* Use host PID namespace in docker example See https://github.com/prometheus/node_exporter/issues/671 * Update readme for readability * Fix comments in readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md34
1 files changed, 5 insertions, 29 deletions
diff --git a/README.md b/README.md
index d4ef98a..e1e5bdf 100644
--- a/README.md
+++ b/README.md
@@ -166,40 +166,16 @@ To see all available configuration flags:
166## Using Docker 166## Using Docker
167The node\_exporter is designed to monitor the host system. It's not recommended 167The node\_exporter is designed to monitor the host system. It's not recommended
168to deploy it as Docker container because it requires access to the host system. 168to deploy it as Docker container because it requires access to the host system.
169If you need to run it on Docker, you can deploy this exporter using the 169Be aware that any non-root mount points you want to monitor will need bind-mounted
170[node-exporter Docker 170into the container.
171image](https://quay.io/repository/prometheus/node-exporter) with the following
172options and bind-mounts:
173 171
174for docker version >= 1.10
175```bash 172```bash
176docker run -d -p 9100:9100 \ 173docker run -d \
177 -v "/proc:/host/proc:ro" \
178 -v "/sys:/host/sys:ro" \
179 -v "/:/rootfs:ro,rslave" \
180 --net="host" \ 174 --net="host" \
181 quay.io/prometheus/node-exporter \ 175 --pid="host" \
182 --path.procfs /host/proc \ 176 quay.io/prometheus/node-exporter
183 --path.sysfs /host/sys \
184 --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"
185``` 177```
186 178
187for docker version < 1.10
188```bash
189docker run -d -p 9100:9100 \
190 -v "/proc:/host/proc:ro" \
191 -v "/sys:/host/sys:ro" \
192 -v "/:/rootfs:ro" \
193 --net="host" \
194 quay.io/prometheus/node-exporter \
195 --path.procfs /host/proc \
196 --path.sysfs /host/sys \
197 --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"
198```
199
200Be aware though that the mountpoint label in various metrics will now have
201`/rootfs` as prefix.
202
203## Using a third-party repository for RHEL/CentOS/Fedora 179## Using a third-party repository for RHEL/CentOS/Fedora
204 180
205There is a [community-supplied COPR repository](https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/). It closely follows upstream releases. 181There is a [community-supplied COPR repository](https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/). It closely follows upstream releases.