-
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
diskio: ability to report only devices, not partitions #4238
Comments
I'm not sure the minor number being 0 would work in all cases, on my system the first device mapper partition also matches:
I wouldn't want to just move the guessing into the plugin, but perhaps we should add major/minor number to the tagset? |
I guess dm-0 is the full device mapper, but I still am unsure if this is always a valid way to determine the full disk. |
Ah. Looks like you are right. Unfortunate. I see dm-0 as just another device--it is not cumulative for the others. Any other possible way to do this? |
Perhaps this heuristic will work well enough in your environment. What if we add major/minor as tags:
And then you can use tagpass/tagdrop to filter:
|
No, I think you are right that major/minor doesn't work well enough for this. I would need those dm-* devices as well. I'm fine to close this as unworkable if there's no other way. |
Maybe this could work?:
|
You forgot the brackets: It doesn't work without them, but it does work with them, at least on my test system (Centos7 VM). Question is, can we shortcut this with a single config option? |
I believe we would want a cross platform way of doing this first, which might be challenging, but also I would want to see how much demand exists for an option like this. |
Hmm, on second thought, it looks like we would want to exclude the device mapper, and just get metrics on the underlying devices. |
Can you add |
Closing as there hasn't been any activity for quite sometime, if anyone is still interested in this please re-open or leave a comment. Thank you! |
Feature Request
Proposal:
Easily filter partitions from being reported.
Current behavior:
Have to use the "devices = [ ... ]" mechanism to try to filter out partitions, such as
devices = [ "sd?" ]
to only get sda, sdb, etc., without getting sda1, sda2, etc. However, if my device naming changes, this will no longer apply.
Desired behavior:
Can easily ignore partitions lines by specifying
ignore_partitions = true
or equivalent. A way to do this on linux is to only match devices with a minor number zero in /proc/diskstats.
Use case: [Why is this important (helps with prioritizing requests)]
We use system images that have several devices and partitions. For the diskio plugin, this is way too chatty. We would like to only report on the devices, without having to guess at a device naming convention.
The text was updated successfully, but these errors were encountered: