I’m running Telegraf in a container and configured the volumes and environment variables as follows:
volumes: - "/:/hostfs:ro" - "/run/udev:/run/udev:ro" - "/var/run/docker.sock:/var/run/docker.sock:ro" - "$PWD/../conf/telegraf:/etc/telegraf/" - "$PWD/../logs/telegraf:/var/log" networks: - backend environment: - HOST_ETC=/hostfs/etc - HOST_PROC=/hostfs/proc - HOST_SYS=/hostfs/sys - HOST_VAR=/hostfs/var - HOST_RUN=/hostfs/run - HOST_MOUNT_PREFIX=/hostfs
It looks like the net plugin is only monitoring “eth0” which is possibly that of the container itself and not the actual host which is connected wirelessly and using wlan0.
Is it possible to get the host net stats without running the container on the “host” network? I would like to run Telegraf behind a reverse proxy and to have direct access to the Influxdb container within the docker environment.