File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
extension/agenthealth/handler/useragent Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,12 @@ const (
3333 flagEnhancedContainerInsights = "enhanced_container_insights"
3434 flagSELinux = "selinux"
3535 flagROSA = "rosa"
36- flagWindowsEventIDs = "win_event_ids"
37- flagWindowsEventFilters = "win_event_filters"
38- flagWindowsEventLevels = "win_event_levels"
3936 separator = " "
4037
4138 typeInputs = "inputs"
4239 typeProcessors = "processors"
4340 typeOutputs = "outputs"
4441 typeFeature = "feature"
45-
46- pluginWindowsEventLog = "windows_event_log"
4742)
4843
4944var (
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ import (
1111 "github.com/aws/amazon-cloudwatch-agent/plugins/inputs/windows_event_log"
1212)
1313
14+ const (
15+ flagWindowsEventIDs = "win_event_ids"
16+ flagWindowsEventFilters = "win_event_filters"
17+ flagWindowsEventLevels = "win_event_levels"
18+ pluginWindowsEventLog = "windows_event_log"
19+ )
20+
1421func (ua * userAgent ) setWindowsEventLogFeatureFlags (input * models.RunningInput ) {
1522 if input .Config .Name == pluginWindowsEventLog {
1623 if plugin , ok := input .Input .(* windows_event_log.Plugin ); ok {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212 "github.com/stretchr/testify/assert"
1313
1414 "github.com/aws/amazon-cloudwatch-agent/plugins/inputs/windows_event_log"
15+ "github.com/aws/amazon-cloudwatch-agent/plugins/inputs/windows_event_log/wineventlog"
1516)
1617
1718func TestSetWindowsEventLogFeatureFlags (t * testing.T ) {
@@ -52,7 +53,7 @@ func TestSetWindowsEventLogFeatureFlags(t *testing.T) {
5253 plugin : & windows_event_log.Plugin {
5354 Events : []windows_event_log.EventConfig {{
5455 Name : "System" ,
55- Filters : []* windows_event_log .EventFilter {{Expression : "test" }},
56+ Filters : []* wineventlog .EventFilter {{Expression : "test" }},
5657 }},
5758 },
5859 expectedFlags : []string {flagWindowsEventFilters },
@@ -75,7 +76,7 @@ func TestSetWindowsEventLogFeatureFlags(t *testing.T) {
7576 Events : []windows_event_log.EventConfig {{
7677 Name : "System" ,
7778 EventIDs : []int {1000 },
78- Filters : []* windows_event_log .EventFilter {{Expression : "test" }},
79+ Filters : []* wineventlog .EventFilter {{Expression : "test" }},
7980 Levels : []string {"ERROR" },
8081 }},
8182 },
You can’t perform that action at this time.
0 commit comments