-
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
Merged
+1,458
−34
Merged
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
5aff55e
Add stub for wmi module
herrBez 60dfc6d
Execute mage update
herrBez 4c6334f
Add first draft of wmi metricset
herrBez e5e45a5
Merge branch 'main' of https://github.com/elastic/beats into wmi
herrBez 880a7ef
Merge branch 'main' of https://github.com/elastic/beats into wmi
herrBez ebc8ceb
Add first draft of wmi windows module
herrBez 6198252
Add config unit test
herrBez 98357b7
Add unit test for the config class
herrBez 70abaef
Add license notice mage fmt
herrBez 0349726
Add License to wmi/wmi.go
herrBez 65d594f
Update example
herrBez aface56
Use wrapping fromat verb for fmt.Errorf
herrBez b833f93
Fix mispelled comment
herrBez a5e69f2
Add first draft of the documentation
herrBez 18ba51d
Add the config reference and config file
herrBez dfb1338
Bump microsfot/wmi to 0.25.1
herrBez aa6b937
Make sure the wmi metricset is only used on windows
herrBez de36999
Run mage update
herrBez 64201dc
Add License for microsoft/wmi library in Notice.txt
herrBez c5adc90
Add Timeout configuration
herrBez d706121
Introduce the ExecuteGuardedQueryInstances to wait for at most a time…
herrBez e0477e5
Merge branch 'wmi' of github.com:herrBez/beats into wmi
herrBez 59b625c
Add invokation of CloseAllInstances() to make sure to free resources …
herrBez f01ba97
Add license header to utils.go
herrBez 0a6c670
Rename timeout to warning_threshold to conceive the message that the …
herrBez 06ae564
Refactor the ExecuteGuardedQueryInstances to use the context.WithTimeout
herrBez c1c956b
Add unit test for ExecuteGuardedQueryInstances
herrBez b29f5c7
Add parameter IncludeEmptyString. Create function to check skip condi…
herrBez bf9c088
Add namespace at the query level and add a structure to index queries…
herrBez c54eca0
Rename the config method to be more explicit
herrBez 3e232f2
Add Primitives to deal with the type convrsion for strings
herrBez 7ff8b88
Add unit test for the conversion function
herrBez f1e67e4
Add heuristic to determine if fetching the CIMType is needed
herrBez c4f7101
Add type conversion
herrBez 1e00ac9
Improve comments to explicitly state what are the config parameters u…
herrBez 54e6642
Add license header to wmi and utils test
herrBez 0cced56
Run mage fmt
herrBez 9661c45
Update the reference config after the final implementation
herrBez ab3c5e6
Remove the dummy field definition
herrBez 6c3c55f
Add sample data in the data.json file
herrBez 969b7cc
Fix go.mod and change NOTICE.txt to reflect the fact that go-ole is n…
herrBez be95605
Make sure that the wmi tests run only on windows
herrBez 9a8b9b8
Improve the error message to prepare a Troubleshooting Guide
herrBez 082873a
Merge branch 'wmi' of github.com:herrBez/beats into wmi
herrBez e7fcdd4
Merge remote-tracking branch 'upstream/main' into wmi
herrBez 4882238
Fix test to use right function
herrBez 213d92e
Add doc.go file
herrBez 83e2627
Add pragma to avoid compiling utils.go on platforms other than windows
herrBez f7b4865
Run make update BEATS=metricbeat
herrBez 8ff47b4
Use Metricset Logger instead of generic one in wmi.go
herrBez cd513ef
Make sure that we are using the Metricset logger everywhere. Address …
herrBez f4c0c7d
Merge branch 'wmi' of github.com:herrBez/beats into wmi
herrBez 8ccb2dc
Merge branch 'main' into wmi
herrBez df56ec6
Run make updates BEATS=metricbeat
herrBez cf9b2f6
Get rid of duplicated rawResult.Clear()
herrBez 63a35c7
Merge branch 'main' into wmi
herrBez 5fd9ba1
Review: remove redundant multiplication by time.Second
herrBez e075995
Review: Fix grammar of error
herrBez 20e260c
Review: Get rid of the panic
herrBez f734e96
Review: Remove redundant check
herrBez 10a9310
Review: Make the namespace settings easier to understand
herrBez b01e730
Review: Honor the query-level namespace in the output document and mo…
herrBez 7617f03
Add a warning if a given query is not producing results
herrBez be75e47
Fix golint warning
herrBez 500b39c
Merge branch 'main' into wmi
herrBez e6117c2
add results of 'make update'
tommyers-elastic dfc331b
Merge branch 'main' into wmi
tommyers-elastic 5e86d2d
Merge branch 'main' into wmi
ishleenk17 b6d2967
Add changelog entry for the wmi metricset
herrBez f766c51
Fix pull request number
herrBez e076caa
Add an explicit variable for the converted field and double check if …
herrBez 35304c5
Make warning easier to read
herrBez 07fb897
Add empty newline in the config.yml
herrBez 2ab90d0
Add codeowners entry for wmi
herrBez 34a7dc9
Add windows.yml.disabled
herrBez ec5ca4f
Modify codeowners at the dataset level
herrBez e26133a
Fix test after renaming of the error message
herrBez ae7f2ae
Update metricbeat/docs/modules/windows.asciidoc
herrBez ca8224d
Fix config reference to generate correct doc
herrBez ef48f83
Merge branch 'main' into wmi
herrBez 845c91b
Update xpack metricbeat.reference.yml
herrBez e88f7af
Merge branch 'wmi' of github.com:herrBez/beats into wmi
herrBez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add Primitives to deal with the type convrsion for strings
- Loading branch information
commit 3e232f2b96213823af3c8fca4e44997015ec2ef0
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put this in a constant with a proper name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and how come the
+"0"
is outside the layout sttring?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The WMI time strings are formatted
20060102150405.999999-070
(they only have three digits for the timezone).By looking at the documentation https://pkg.go.dev/time#pkg-constants I thought we were forced to have either 4 or 2 digits, while we have three in the string. So I thought to reduce the case to 4 digits.
It seems to work also by using 3 digits. Should I go with three digits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeh i think you can any format you want, so let's go with 3 if it works.