-
Notifications
You must be signed in to change notification settings - Fork 703
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 hyperv #150
add hyperv #150
Conversation
Hi @iyacontrol |
hi,@carlpett
i kooks like the counter, note the bolded code. but it is is actually misleading. so I have changed some metrics
|
Hi, |
Have been looking for this, would be great if hyperv was added. |
@EYEVO Since @iyacontrol hasn't responded, perhaps you could have a look at the returned data to see if the *persec metrics are counters or gauges? I don't have a HyperV server handy to check myself. |
So far what i have found that all the hyperv values(that i have tested) seem to go up so that would mean counters. |
@EYEVO Thanks! Get-WmiObject ClassNameHere |`
Select -ExpandProperty Properties |`
Where Name -like "*PerSec" |`
Foreach { New-Object psobject -Property @{`
Name=$_.Name; `
CounterType=($_.Qualifiers | ? Name -eq "CounterType").Value; `
}`
} The types are documented here: https://msdn.microsoft.com/en-us/library/aa389383(v=vs.85).aspx. |
Another vote for this, anything I can do to help? |
@tunaman Thanks! If you could try the powershell command above, that would be helpful so we can get the types right. Also, if you have the possibility to run the build from this PR on a machine with Hyper-V and check that the /metrics output looks good, that'd be great! |
Will do, but |
Also would it be possible to provide a build with this PR? I'm currently on a Mac and I'm running in to cross (go) compile issues as it seams. |
Ah, of course, sorry. Yes, ClassNameHere would be each of the classes that the PR touches. Thanks for the help! |
Thanks for the build! Executing the command
Now for the powershell script, when using the
If you need anything else let me know! |
Thanks! Looks like this needs some more work still, then, given the errors. |
Sure I can definitely help out. Looking forward to the end result. |
@tunaman Did some cleanup now, which will hopefully improve the results. Binary is available here. Again, thanks for helping out! |
I'm also fairly sure the guest cpu usages will show pretty strange numbers right now, but some validation there would help a lot |
Hi, Unfortunately the latest build crashes when I try to load http://localhost:9182/metrics.
With regards to the server specs:
Currently we have 9 VM's active. The Intel nics are connected to 2 switches for redundancy. |
Ah, I missed a few places where I needed to address the labels... Bit painful to do this without being able to test locally. Oh well, pushed a new version now which hopefully will fix that panic. |
Latest build looks good!
|
Nice! I'm a bit sceptical of the label name
Are those names actually virtual machines? Also a bit surprised that it doesn't seem like the cpu usage is broken down by VM in |
Yeah those are definitely VM's,
If I adjust the PS script and filter on
|
Right. I'll change the label.
No, I was wondering if the Perfmon tool in Windows also didn't show the CPU per VM. That would to me suggest that we are missing some classes, since this seems like a crucial feature to have... If you check the |
I can add the While googling I stumbled upon this script which does see to do what we need. |
Hm, that seems to pull from classes in another namespace altogether. Perhaps I should just fire up a VM somewhere and install Hyper-V, so you don't have to provide a testbed and iterative troubleshooting. |
That would probably speed it up a bit. Let me know if you still need me to test anything. |
@tunaman Made some progress now - noticed that there was a mixup of classes in there, which was the reason the VM metrics didn't appear. This looks (more) reasonable on my small test setup, so if you have some time to test this and validate, it'd be a great help. I've also seen that there are a lot of fields that are currently not exported. I'll leave that as a future expansion opportunity though, to try to keep the scope of this PR down. |
Latest build looks good to me, you can find the output here |
Thanks a lot for your help @tunaman! |
I've released this as v0.3.1, binaries should be available soon. |
Glad to help out! I’ll deploy this once the binaries become available |
Add hyperv collector
add hyperv for wmi_exporter.
for hyperv, it is hard to get metrics from a remote collector, so i think it is right way to add hyperv for wmi_exporter.