-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System Input Plugin should have also variable for determinate path to /hostfs/var #3339
Comments
@shirou Do you think we should add a |
@muhahacz I know some people have used the advice in this comment for setup: #1544 (comment). I agree we need to do additional testing and add some setup advice to the documentation. |
@danielnelson I agree to add environmental variable support to |
@shirou Yes, I think so. I'll submit a PR later today. |
Seems its fixed in gopsutil v2.17.10. |
In this case HOST_VAR=/hostfs/var/ variable does not work as expected.. 2017-11-16T15:16:10Z E! Error in plugin [inputs.system]: open /hostfs/var/run/utmp: no such file or directory Container: Host: Symlink breaks /hostfs/ prefix utmp in container is located here: Workaround for now is bind it directly like: |
Thanks for the update @muhahacz, this seems similar to the issues we had with I'm not sure if there is a better way to address this than your workaround. |
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
The text was updated successfully, but these errors were encountered: