-
Notifications
You must be signed in to change notification settings - Fork 710
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
Perf: Add volume name label #1
Perf: Add volume name label #1
Conversation
|
||
"github.com/StackExchange/wmi" | ||
"github.com/prometheus/client_golang/prometheus" | ||
) | ||
|
||
var ( | ||
volumeWhitelist = flag.String("collector.perf.volume-whitelist", ".+", "Regexp of volumes to whitelist. Volume name must both match whitelist and not match blacklist to be included.") | ||
volumeBlacklist = flag.String("collector.perf.volume-blacklist", "_Total", "Regexp of volumes to blacklist. Volume name must both match whitelist and not match blacklist to be included.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd hardcode the _Total in the code itself, so that a user doesn't have to remember to explicitly exclude it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. If the user actually wants a total, then they can use sum()
I started looking a bit more carefully at the data we're getting here, and after doing a bit more reading on the |
After yet another look, the |
@carlpett: This is great! I was also looking into this yesterday but ran out of time. My approach was to build the measure name from the drive letter, something like "perfc_disk_bytes_per_sec", "perfd_disk_bytes_per_sec" etc. How would one differentiate the measures with this patch? Got to spin up a vm and try it out.
|
Also, the name "perf" just came from "Win32_PerfRawData_PerfDisk_LogicalDisk", and was short. "logical_disk" is pretty long. perhaps "io" is better? |
to summarize, additional points to be fixed mentioned here (also added to the wiki) |
Well yes, sort of :) This will expose all volumes (which maps to partitions unless you use Windows Logical volumes/software raid). Here's a sample from my machine:
I've got a fix for |
Okay, yes it looks better than what I had in mind :) |
On Unix anyway, the equivalent would only export mounted filesystems. I'd guess Windows should be the same. How do you have a percentage free space over 100%? |
I tested the subpath mount, and it turns out well:
@brian-brazil This should mean that we could by default filter out anything like As for the strange data in the initial post, that was before any of the other work done in the #5, so it just contained the raw data from WMI. |
…rd-and-add-vendor UPSTREAM: <carry>: Add vendor dir
Signed-off-by: Francisco Junior <[email protected]>
…lector Feature/ohm collector
As per the TODO list on the wiki, I added volume labels to the perf collector. I also added a whitelist/blacklist functionality similar to what is used in other exporters, defaulting to excluding the
_Total
"meta-counter".By the way, shouldn't the collector be named something like logical_disk rather than perf?