-
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
add support for diskio tags & naming #1453
Conversation
these need to be changed to |
The TOML parser supports both formats. Putting If no design changes are necessary I'll work on updating the docs, including the sample config. |
PR updated with sample config documentation, tests, and changelog update. |
sorry to let this fall through the cracks @phemmer, can you rebase again? |
Rebased |
What about these tags for |
Somehow I missed this comment. Sorry :-( Anyway, I had considered this possibility previously, and I think it could be done, but it had a few minor gotchas. Unfortunately without going through it again, I can't recall what they were. |
@sparrc rebased |
This adds support for adding tags and device naming via udev info.
This should address #1386, and #1428
Lets start with the configuration
The
NameTemplates
parameter says to set thename
parameter to theID_FS_LABEL
value if it exists, and if not then a concatenation ofDM_VG_NAME/DM_LV_NAME
, and if either of those tags don't exist, it falls back to the original device name.The
DeviceTags
parameter is a list of udev variables to add as device tags to the measurement.The result looks like this on my system:
The first line is an example of
$ID_FS_LABEL
being used (name=mytestlabel
).On several of the entries we can see the
$DM_VG_NAME/$DM_LV_NAME
in action, such as insys/crypt
.The 3rd line shows us an entry that fell all the way through to normal naming (
name=sda1
).And then on many of the lines, we can see the
ID_FS_TYPE
andID_FS_USAGE
tags.I designed the code so that on operating systems without udev, the plugin still works, and that the plugin can be easily adapted for any device information available in these other operating systems.
Still needs tests & documentation, but can add once some high level feedback is obtained.
Required for all PRs: