[Metricbeat][WMI]Add query class and validation
Proposed commit message
Improve the wmi module
Changes
Improvement to the WMI Module including:
Bugfixes
- Prevent marshaling of CIM object types to avoid runtime panics
- Fix type conversion for
uint64,sint64anddatetimearrays
Enhancements
- Add support for the parameter
wmi.include_query_classparameter - Introduce a rudimentary validation for the queries:
- validate the queried class
- validate the queried properties
- Report errors as documents with the
error.messagefield populated (enhance the troubleshooting experience) - Cache the schema of the instance classes
- Add a
wmi.max_rows_per_queryparameter to limit the number of results to return - Add a
wmi.schema_cache_sizeto limit the number of cached class definition per query - Improve the documentation
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have made corresponding change to the default configuration files
- [x] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added an entry in
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.
Disruptive User Impact
N/A given that the feature is not released yet
Author's Checklist
How to test this PR locally
Related issues
Use cases
- Monitor WMI
Screenshots
Logs
:robot: GitHub comments
Expand to view the GitHub comments
Just comment with:
rundocs-build: Re-trigger the docs validation. (use unformatted text in the comment!)
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @herrBez? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-8./dis the label to automatically backport to the8./dbranch./dis the digitbackport-active-allis the label that automatically backports to all active branches.backport-active-8is the label that automatically backports to all active minor branches for the 8 major.backport-active-9is the label that automatically backports to all active minor branches for the 9 major.
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b add_query_class_and_validation upstream/add_query_class_and_validation
git merge upstream/main
git push upstream add_query_class_and_validation
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b add_query_class_and_validation upstream/add_query_class_and_validation
git merge upstream/main
git push upstream add_query_class_and_validation
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b add_query_class_and_validation upstream/add_query_class_and_validation
git merge upstream/main
git push upstream add_query_class_and_validation
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)
Hi there,
Do I need a backport-8.19 label to make sure a backport PR is created?