-
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
Expected udev properties cannot be used in diskio input #3663
Comments
It looks like the suggest Get the major/minor device numbers:
Then we use this file as source of the device_tags:
I'm not sure if there is a good source of these properties outside of this method, other than running |
Although this data is cached, so maybe we could use |
I wouldn't recommend caching udevadm, as the device could get replaced between polling cycles, and you wouldn't know.
Not including these was actually deliberate when I wrote the device tagging stuff, as I didn't think they'd serve any use considering that |
Sure,
|
We currently cache by devname (i.e.: I think it would be nice to use udevadm here, that way we don't have to have any asterisks in the docs explaining why some property doesn't exist. Side note, the function we call on each interval in gopsutil already runs this |
Pinging this one, as I have felt on this today with the missing DEVTYPE information from the diskio plugin. Worth noting it would also close #4238 (obviously, I also have the same need, and got tired of a long regex to remove partitions) This aside, @danielnelson, udevadm just collects existing information. A property can exist on a given dev type, but could be missing on another dev type (for example, any dm-* usually lacks the ID_* properties) . |
Hi, Looking through older bugs to see if any action is still required. Based on the discussion it does seem like adding $ grep DEVTYPE /sys/dev/block/*/uevent
/sys/dev/block/259:0/uevent:DEVTYPE=disk
/sys/dev/block/259:1/uevent:DEVTYPE=disk
/sys/dev/block/259:2/uevent:DEVTYPE=partition
/sys/dev/block/259:3/uevent:DEVTYPE=partition
/sys/dev/block/259:4/uevent:DEVTYPE=partition
/sys/dev/block/259:5/uevent:DEVTYPE=partition
/sys/dev/block/259:6/uevent:DEVTYPE=partition
/sys/dev/block/259:7/uevent:DEVTYPE=partition
/sys/dev/block/259:8/uevent:DEVTYPE=partition |
I just wanted to add that I've spent WAY too long on this one as well. My big problem was that my docker didn't have privledge=true in the compose. As soon as I added that, everything worked as expected. |
@cornerot and @eskemojoe007 please test the binary in PR #15003 available once CI finished the tests. Let me know if this fixes the issue! |
Bug report
Relevant telegraf.conf:
[[inputs.diskio]]
device_tags = ["DEVTYPE", "ID_FS_TYPE"]
System info:
Telegraf v1.5.0 (git: release-1.5 a1668bb)
CentOS Linux release 7.4.1708 (Core)
Steps to reproduce:
Expected behavior:
DEVTYPE and ID_FS_TYPE tags in the telegraf output
Actual behavior:
ID_FS_TYPE only
Additional info:
telegraf ignoring all device_tags in the [[inputs.diskio]] section which does not contain underscore: DEVNAME, DEVTYPE, SUBSYSTEM, etc.
The text was updated successfully, but these errors were encountered: