Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/config/setup/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,7 @@ func applyInfrastructureModeOverrides(config pkgconfigmodel.Config) {
config.Set("network_path.collector.filters", defaultNetworkPathCollectorFilters, pkgconfigmodel.SourceAgentRuntime) // Agent runtime source is required to override customer defined filters with default configuration

// Enable features for end_user_device mode
config.Set("network_path.connections_monitoring.enabled", true, pkgconfigmodel.SourceInfraMode)
config.Set("process_config.process_collection.enabled", true, pkgconfigmodel.SourceInfraMode)
config.Set("software_inventory.enabled", true, pkgconfigmodel.SourceInfraMode)
config.Set("notable_events.enabled", true, pkgconfigmodel.SourceInfraMode)
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/setup/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ infrastructure_mode: end_user_device
assert.True(t, foundSlack, "*.slack.com should be in the default filters")
assert.True(t, foundGitHub, "*.github.com should be in the default filters")

// Check that connections monitoring is enabled
assert.True(t, config.GetBool("network_path.connections_monitoring.enabled"), "connections monitoring should be enabled in end_user_device mode")
}

func TestUsePodmanLogsAndDockerPathOverride(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/system-probe/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func load() (*types.Config, error) {
if cfg.GetBool(pngNS("enabled")) {
c.EnabledModules[PingModule] = struct{}{}
}
if cfg.GetBool(tracerouteNS("enabled")) {
if cfg.GetBool(tracerouteNS("enabled")) || eudmEnabled {
c.EnabledModules[TracerouteModule] = struct{}{}
}
if cfg.GetBool(discoveryNS("enabled")) {
Expand Down
31 changes: 31 additions & 0 deletions pkg/system-probe/config/config_linux_bpf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,37 @@ func TestNPMEnabled(t *testing.T) {
}
}

func TestTracerouteModuleEnabledForEUDM(t *testing.T) {
mock.New(t)
mock.NewSystemProbe(t)

tests := []struct {
name string
eudm bool
tracerouteConfig bool
expected bool
}{
{"neither enabled", false, false, false},
{"traceroute config only", false, true, true},
{"eudm only", true, false, true},
{"both enabled", true, true, true},
}

for _, te := range tests {
t.Run(te.name, func(t *testing.T) {
if te.eudm {
t.Setenv("DD_INFRASTRUCTURE_MODE", "end_user_device")
} else {
t.Setenv("DD_INFRASTRUCTURE_MODE", "full")
}
t.Setenv("DD_TRACEROUTE_ENABLED", strconv.FormatBool(te.tracerouteConfig))
cfg, err := New("", "")
require.NoError(t, err)
assert.Equal(t, te.expected, cfg.ModuleIsEnabled(TracerouteModule), "unexpected traceroute module enablement: eudm: %v, traceroute config: %v", te.eudm, te.tracerouteConfig)
})
}
}

func TestRedisMonitoringEnabledForSupportedKernelsLinux(t *testing.T) {
t.Setenv("DD_SERVICE_MONITORING_CONFIG_REDIS_ENABLED", strconv.FormatBool(true))
cfg := mock.NewSystemProbe(t)
Expand Down
Loading