-
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
[Metricbeat] Windows Module add wmi metricset #42017
base: main
Are you sure you want to change the base?
Conversation
This pull request doesn't have a |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
One of the challenges with running arbitrary WMI queries is that WMI queries can be extremely slow and certain WMI queries can actually result in changes to the system -- have we considered whether or how we might provide timeout functionality for running WMI queries? |
Hi, good points! Thank you for the comment :).
About the timing issues: I don't see a parameter in the library to stop a query after X seconds (I would need to understand if the underlying library/WMI have a similar mechanism). Maybe by leveraging an ExecAsyncQuery (there is no "exposed" method for this) we can stop after a timeout. Similarly to what is done here: https://github.com/microsoft/wmi/blob/v0.25.0/pkg/wmiinstance/WmiEventSink_test.go#L66. Not sure it's actually stopping the underlying query after some time. About the "can actually result in changes to the system": with the current implementation we can only build queries of type |
A WMI query does whatever the underlying WMI provider decides it should do. This means a developer can create a WMI provider which upon a A common bad actor example is the win32_product provider. When queried, the win32_product provider verifies the integrity of all installed MSI packages on the system. For any products where integrity cannot be verified it performs a repair install of the MSI. You have to read quite a bit of documentation to land on this fact:
...
This means a simple |
Proposed commit message
[Metricbeat][Windows] Add experimental wmi metricset
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
This PR does not have impact to existing use-cases
Author's Checklist
How to test this PR locally
Related issues
Use cases
As a windows user I want to leverage WMI (and in particular WQL, SQL for WMI) to extract detailed system information and metrics.
Screenshots
Logs