-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Enhance windows/perfmon metricset #3828
Comments
Hi @ruflin, how do you want to go on with this issue. Should we create a PR for every point or just one big PR? |
@maddin2016 I'm a fan of lots of small PR's as it makes it easier to review and get the changes in quickly but one large would also work. |
I would like to start with
|
@maddin2016 The above will still block for 2 seconds. I was more thinking of finding an option to only wait until the all the data is available or even skip it in the first run. Not sure what the best behaviour is. That is probably one of the trickiest once in the list above. I would suggest to first focus on the cleanup part, for example change to the config options. |
Ok. Here is an description of the problem
So if we don't wait the first value is always |
I have started two PR's for config handling and the missing |
I opened an intermediate PR to refactor the code and error handling. I made a change to remove the sleep, but the first value will always be |
Refactoring of the Windows performance data code. There's more cleanup to come. See elastic#3828. - Improve generated PDH code to return usable error codes. - Use the standard error interface in return values. - Use more restrictive param types in generated functions. - Create PdhErrno that interprets the PDH error codes and returns their human readable error string.
Refactoring of the Windows performance data code. There's more cleanup to come. See #3828. - Improve generated PDH code to return usable error codes. - Use the standard error interface in return values. - Use more restrictive param types in generated functions. - Create PdhErrno that interprets the PDH error codes and returns their human readable error string.
Congrats @maddin2016, this is being released today with 6.0.0-alpha1. 🎉 Since more people will be trying it now, it would be nice to get some more example in the docs and put some real data into the |
Great to hear @andrewkroh 🎉 Many thanks for your help to get this finished!! |
I think it is fine as long as it is clear it is only an example. Is there a way to auto generate the |
@ruflin, i currently have rebase my master. If i try to debug, i get the following error
Can you confirm this? |
I use go |
🙈 Sorry. Just read that the current go version for developing is |
This would be an example output. Is this ok {
"@timestamp": "2017-05-10T06:42:11.339Z",
"beat": {
"hostname": "beathost",
"name": "beathost"
},
"metricset": {
"module": "windows",
"name": "perfmon"
},
"windows": {
"perfmon": {
"processor": {
"time": {
"total": {
"pct": 22.486702
}
}
}
}
}
} |
@maddin2016 is this auto generated or manually? |
This is generated manually. Just changed |
Any chance it could be generated automatically? Reason I'm asking is that in case we change something in the data model, it is very easy for us to recreate all the files again. |
I have debug the project and just copy the output. How do you normally generate these |
Each metricset normally has a test called To then run this test you have to run |
Ok, then i have just to extend my current test file. Thanks @ruflin |
@ruflin, if i run this test i get this
|
Got it. Have to add |
I have opened #4287 |
@ruflin, @andrewkroh. Can you please track a new feature to the list above. It's about using wildcard querys to collect data from multiple instances from a counter.
Lets say you have 3 disks. Then the following counters are available.
Currently we just can call This is also needed for #3798. I will add this ASAP and open a new PR. Thanks. PS: Maybe the actual docs should point out to this missing feature. |
Is this enhancement still being considered for a future release? - Currently we have metricbeat deployed to over 10,000 windows endpoints and when one of the defined WMI counters no longer exists the service stops. Being able to ignore the failures for non-existent counters would be massive improvement so we don't lose all data from the endpoint. Thanks! |
@krasekhi Lets open a separate issue for this one to better track it instead of just the list above. Could you open one? |
Hi @ruflin, @andrewkroh for my inclusion (😄) back to beats, i think this is a good start. I would just catch if an counter not exists and write a warning into log. |
And of course make this optional as a config option. |
@martinscholz83 You have a PR in mind? :-D |
I'm closing this meta issue as we have covered allmost all the points above. For all the new things to come we should open separate issues / PR's. @martinscholz83 Thanks a lot for getting us to this point. |
This is a meta issue to track enhancements to the windows/perfmon metricset created in #3758.
// go:generate <cmd>
lines to doc.go for generatingdefs_windows_<goarch>.go
fromdefs_windows.go
. Add missing go generate lines for perfmon metricset #3856 Update Metricbeat perfmon go:generate commands #3862data.json
with a real example generated from a_test.go
file. Perfmon metricset add real data example #4287The text was updated successfully, but these errors were encountered: