Hello mates,
I'm struggling with getting telegraf running inside a container and accessing
the host system ressources.
What:
I want to run Telegraf as a Docker container which collects host metrics (CPU,
memory, diskio, and so on). If I display the running processes, so just 1-2 are
shown. If I run telegraf installed on the host (without running in a container)
so there are above 200 processes.
I need:
Some documentation or help. How can I improve my mount points?
What I have:
OS: Ubuntu 16.04.1
Docker compose file:
telegraf:
container_name: telegraf-pl-1
image: "telegraf:latest"
volumes:
- ./config/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run:/var/run:ro
- /proc:/hostfs/proc:ro # second approach
- /sys:/hostfs/sys:ro # dsecond approach
- /etc:/hostfs/etc:ro # second approach
# - /var/run/docker.sock:/var/run/docker.sock
# - /sys:/rootfs/sys:ro
# - /proc:/rootfs/proc:ro
# - /etc:/rootfs/etc:ro
# - /var/run/utmp:/var/run/utmp:ro
# - /:/rootfs:ro
environment:
# - HOST_PROC=/rootfs/proc
# - HOST_SYS=/rootfs/sys
# - HOST_ETC=/rootfs/etc
# - HOST_ROOT_FS=/rootfs
# - HOST_MOUNT_PREFIX=/rootfs
- HOST_PROC=/hostfs/proc # second approach
- HOST_SYS=/hostfs/sys # second approach
- HOST_ETC=/hostfs/etc # second approach
- HOST_MOUNT_PREFIX=/hostfs # second approach
Every help is very much appreciated!
With warm regards
Christoph
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/0f3e40f8-10df-4fed-b247-f35bd7c00ff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.