Skip to content

Commit a36eea6

Browse files
committed
Move flags to windows file
1 parent f583738 commit a36eea6

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

extension/agenthealth/handler/useragent/useragent.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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

4944
var (

extension/agenthealth/handler/useragent/useragent_windows.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
1421
func (ua *userAgent) setWindowsEventLogFeatureFlags(input *models.RunningInput) {
1522
if input.Config.Name == pluginWindowsEventLog {
1623
if plugin, ok := input.Input.(*windows_event_log.Plugin); ok {

extension/agenthealth/handler/useragent/useragent_windows_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

1718
func 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
},

0 commit comments

Comments
 (0)