-
Notifications
You must be signed in to change notification settings - Fork 233
Agent Health Metric for Windows Events Filtering #1787
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
base: feature/windows-regex-filtering
Are you sure you want to change the base?
Agent Health Metric for Windows Events Filtering #1787
Conversation
615200a
to
9fb255f
Compare
@@ -34,6 +35,9 @@ const ( | |||
flagSELinux = "selinux" | |||
flagROSA = "rosa" | |||
separator = " " | |||
flagWindowsEventIDs = "windows_event_ids" |
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.
could you move this under flagROSA?
flagSELinux = "selinux"
flagROSA = "rosa"
flagWindowsEventIDs = "windows_event_ids"
flagWindowsEventFilters = "windows_event_filters"
flagWindowsEventLevels = "windows_event_levels"
separator = " "
@@ -6,6 +6,7 @@ package useragent | |||
import ( | |||
"fmt" | |||
"os" | |||
"reflect" |
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.
what is this?
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.
Looks like reflect is used for type validation below
@@ -74,6 +78,35 @@ var _ UserAgent = (*userAgent)(nil) | |||
func (ua *userAgent) SetComponents(otelCfg *otelcol.Config, telegrafCfg *telegraf.Config) { | |||
for _, input := range telegrafCfg.Inputs { | |||
ua.inputs.Add(input.Config.Name) | |||
|
|||
if input.Config.Name == "windows_event_log" { |
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.
nit: can we not nest this?
Description of the issue
Currently, there is no way to know the number of customers using the windows event filtering in the Agent's configuration. This PR address this issue by adding the feature as part of the user-agent string for detection during API calls to CloudWatch.
Description of changes
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Filter flags been added to the user-agent input string.
Dashboard showing usage of filters: Team Dashboard
Requirements
Before commiting your code, please do the following steps.
make fmt
andmake fmt-sh
make lint
Integration Tests
To run integration tests against this PR, add the
ready for testing
label.