-
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 |
…out for the result
…query is not actually cancelled
Add an interface WmiQueryInterface to allow mocking the session object
…tions and add a test
… on the namespace. Add logic to create a single connection per Namespace
…ow directly used in the WMI module
Hi @ishleenk17, @tommyers-elastic , I implemented all changes we discussed offline and the dataset is ready for review. I am having a very hard-time in making the CI/CD pipeline work. Could you help me shred some lights? In particular, I am not able to understand how to fix the error reported here https://github.com/elastic/beats/actions/runs/12483185235/job/34838540533?pr=42017. |
|
Hi Ishleen, thank you for the help.
I receive the error as part of the execution of the command and I don't understand how to fix it. |
This pull request is now in conflicts. Could you fix it? 🙏
|
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