-
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
Disk input not reporting metrics for all mounted disk #1544
Comments
The problem is that This is the problem: if you @nyxcharon Try removing the |
thanks for tracking that down @j-vizcaino, is this just a documentation issue then? care to submit a PR? |
Problem is in the code: it prepends |
Digging more, it seems the problem is a bit more complex. My previous comment can be discarded: mount points should appear in This should be addressed in https://github.com/shirou/gopsutil by opening |
I was wrong again. |
@j-vizcaino, did you find a solution for this? I tracked it down to the same issue you are describing, the problem is really mtab being a symlink to /proc/self/mounts :(
|
A workaround: docker run --rm -v /:/hostfs:ro -e HOST_MOUNT_PREFIX=/hostfs -e HOST_ETC=/foo/etc -e HOST_PROC=/hostfs/proc -e HOST_SYS=/hostfs/sys -v /proc/1/mounts:/foo/etc/mtab -it telegraf:1.1.2 .. HostEtc is only used in a handlful of places: https://github.com/shirou/gopsutil/search?utf8=%E2%9C%93&q=HostEtc |
@m4ce Sorry for the late reply. In our current deployment of telegraf, we
Hope this helps. |
@j-vizcaino Trying to follow your example: Container:
In the container:
Then...trying to run telegraf:
What am I doing wrong here? |
Ah. Running with "--privileged=true" breaks this behaviour. |
@johnseekins The |
Strange how that was failing, and now that you've mentioned the needed mount, it is working...without my having mounted anything new... Magic! Anyway...it looks good to me. And that seems like a reasonable work-around...should the README be updated? |
Another, related question... We now get some stats about /etc/hosts, /etc/resolv.conf, /etc/hostname and such from within the container. These are all duplicates of each other, too. Any magic tricks to get rid of these duplicates? |
With Telegraf 1.13.4, this is all you need to get
Working example:
|
I believe the last environment variable you are setting is |
Bug report
The disk plugin is not reporting metrics for a mounted disk, but the diskio plugin does.
Relevant telegraf.conf:
System info:
Telegraf - version 1.0.0-beta2-18-g755b2ec
CoreOS stable (1010.6.0)
Docker version 1.10.3, build 8acee1b
Telegraf Docker container: quay.io/deis/telegraf:v2.1.0
Output of "mount" from inside the docker container (trimmed down to remove tmpfs mounts)
The disk of interest is /dev/xvdba.
The docker container is run with the following environment variables set (it's launched via kubernetes which is why this is yaml)
Steps to reproduce:
Run docker container with the above environment variables set
Expected behavior:
To be able to query influxdb and see the disk stats on "/dev/xvdba on /hostfs/var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-west-2a/vol-bd4c4165 type ext4 (rw,relatime,seclabel,data=ordered)"
Actual behavior:
No disk stats are available
Additional info:
I can query the diskio stats for this disk in telegraf. The query
select * from disk where time > now() - 30s and "host" = '<ip>'
returnsThe text was updated successfully, but these errors were encountered: