Fix HOST_MOUNT_PREFIX in docker with disk input (#3529)

This commit is contained in:
Daniel Nelson
2017-12-01 11:21:39 -08:00
committed by GitHub
parent e400ec2b57
commit 7f66863b87
4 changed files with 38 additions and 8 deletions

View File

@@ -1,5 +1,24 @@
# Frequently Asked Questions
### Q: How can I monitor the Docker Engine Host from within a container?
You will need to setup several volume mounts as well as some environment
variables:
```
docker run --name telegraf
-v /:/hostfs:ro
-v /etc:/hostfs/etc:ro
-v /proc:/hostfs/proc:ro
-v /sys:/hostfs/sys:ro
-v /var/run/utmp:/var/run/utmp:ro
-e HOST_ETC=/hostfs/etc
-e HOST_PROC=/hostfs/proc
-e HOST_SYS=/hostfs/sys
-e HOST_MOUNT_PREFIX=/hostfs
telegraf
```
### Q: Why do I get a "no such host" error resolving hostnames that other
programs can resolve?