aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorYecheng Fu <cofyc.jackson@gmail.com>2018-10-04 20:11:21 +0800
committerBen Kochie <superq@gmail.com>2018-10-04 14:11:21 +0200
commit0f9842f20a036d2db8f29102e6bc0cd7b1672865 (patch)
treeb6b8451169448d437f82d13c7020c25ddd51edc5 /README.md
parent2269df255c8627f819afd3d2d6bb99d809b2ac9c (diff)
downloadprometheus_node_collector-0f9842f20a036d2db8f29102e6bc0cd7b1672865.tar.bz2
prometheus_node_collector-0f9842f20a036d2db8f29102e6bc0cd7b1672865.tar.xz
prometheus_node_collector-0f9842f20a036d2db8f29102e6bc0cd7b1672865.zip
[continue 912] strip rootfs prefix for run in docker (#1058)
* strip rootfs prefix for run in docker * Use `/` as default value of path.rootfs, and parse mounts from `/proc/1/mounts`. * No need to mount `/proc` and `/sys` because we share host's PID namespace, which allows processes within the container to see all of the processes on the system. Closes: #66 Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com> Signed-off-by: Yecheng Fu <cofyc.jackson@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index b3940c5..320b54f 100644
--- a/README.md
+++ b/README.md
@@ -144,12 +144,17 @@ The `node_exporter` is designed to monitor the host system. It's not recommended
144to deploy it as a Docker container because it requires access to the host system. 144to deploy it as a Docker container because it requires access to the host system.
145Be aware that any non-root mount points you want to monitor will need to be bind-mounted 145Be aware that any non-root mount points you want to monitor will need to be bind-mounted
146into the container. 146into the container.
147If you start container for host monitoring, specify `path.rootfs` argument.
148This argument must match path in bind-mount of host root. The node\_exporter will use
149`path.rootfs` as prefix to access host filesystem.
147 150
148```bash 151```bash
149docker run -d \ 152docker run -d \
150 --net="host" \ 153 --net="host" \
151 --pid="host" \ 154 --pid="host" \
152 quay.io/prometheus/node-exporter 155 -v "/:/host:ro,rslave" \
156 quay.io/prometheus/node-exporter \
157 --path.rootfs /host
153``` 158```
154 159
155On some systems, the `timex` collector requires an additional Docker flag, 160On some systems, the `timex` collector requires an additional Docker flag,