Bug report
System Input Plugin should have also variable for determinate path to /hostfs/var
Logs:
2017-10-13T04:52:40Z E! Error in plugin [inputs.system]: open /var/run/utmp: no such file or directory
HOST_VAR=/hostfs/var should be a solution, just like in HOST_ETC= case
Relevant telegraf.conf:
[inputs.system]
System info:
Telegraph 1.4.2
Alpine 3.6
Steps to reproduce:
docker run -d --name telegraf --net host -v /:/hostfs:ro -e HOST_MOUNT_PREFIX=/hostfs -e HOST_ETC=/hostfs/etc mytelegraf
Proposal:
docker run -d --name telegraf -v /:/hostfs:ro -e HOST_MOUNT_PREFIX=/hostfs -e HOST_ETC=/hostfs/etc -e HOST_VAR=/hostfs/var mytelegraf
or
docker run -d --name telegraf -v /:/hostfs:ro -e HOST_MOUNT_PREFIX=/hostfs -e HOSTFS_PREFIX=/hostfs mytelegraf
Additional info:
There are no steps in docs to run telegraph in docker with host monitoring.
For example:
--net host ?
--cap_add ?
--priviledged ?
Thanks