mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-03-05 21:00:12 -08:00
Update README.md: use 'mode: host' in Docker Swarm configuration
Signed-off-by: Valentino Lauciani <vlauciani@gmail.com>
This commit is contained in:
parent
d611fb2504
commit
8c9bd56c95
18
README.md
18
README.md
|
@ -68,6 +68,24 @@ services:
|
||||||
- '/:/host:ro,rslave'
|
- '/:/host:ro,rslave'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For Docker compose for Docker Swarm, `network_mode` and `pid` are not supported. The `network_mode` option must be replaced with `mode: host` in the `ports` section.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
node_exporter:
|
||||||
|
image: quay.io/prometheus/node-exporter:latest
|
||||||
|
. . .
|
||||||
|
ports:
|
||||||
|
- target: 9100
|
||||||
|
published: 9100
|
||||||
|
protocol: tcp
|
||||||
|
mode: host
|
||||||
|
. . .
|
||||||
|
```
|
||||||
|
|
||||||
On some systems, the `timex` collector requires an additional Docker flag,
|
On some systems, the `timex` collector requires an additional Docker flag,
|
||||||
`--cap-add=SYS_TIME`, in order to access the required syscalls.
|
`--cap-add=SYS_TIME`, in order to access the required syscalls.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue