Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make service_discovery disabled by default (#27228)
Browse files Browse the repository at this point in the history
rarguelloF authored and pull[bot] committed Sep 20, 2024
1 parent 6314e3f commit 0b4dd17
Showing 6 changed files with 5 additions and 14 deletions.
2 changes: 0 additions & 2 deletions cmd/agent/dist/conf.d/service_discovery.d/conf.yaml.default

This file was deleted.

3 changes: 0 additions & 3 deletions omnibus/config/software/datadog-agent-finalize.rb
Original file line number Diff line number Diff line change
@@ -52,9 +52,6 @@
# load isn't supported by windows
delete "#{conf_dir}/load.d"

# service_discovery isn't supported by windows
delete "#{conf_dir}/service_discovery.d"

# Remove .pyc files from embedded Python
command "del /q /s #{windows_safe_path(install_dir)}\\*.pyc"
end
3 changes: 3 additions & 0 deletions pkg/collector/corechecks/servicediscovery/impl_linux_test.go
Original file line number Diff line number Diff line change
@@ -168,6 +168,7 @@ func cmpEvents(a, b *event) bool {
func Test_linuxImpl(t *testing.T) {
host := "test-host"
cfgYaml := `ignore_processes: ["ignore-1", "ignore-2"]`
t.Setenv("DD_SERVICE_DISCOVERY_ENABLED", "true")

type checkRun struct {
aliveProcs []testProc
@@ -597,6 +598,8 @@ func (errorPortPoller) OpenPorts() (portlist.List, error) {
}

func Test_linuxImpl_errors(t *testing.T) {
t.Setenv("DD_SERVICE_DISCOVERY_ENABLED", "true")

// bad procFS
{
li := linuxImpl{
2 changes: 1 addition & 1 deletion pkg/config/setup/config.go
Original file line number Diff line number Diff line change
@@ -782,7 +782,7 @@ func InitConfig(config pkgconfigmodel.Config) {
config.BindEnvAndSetDefault("sbom.host.analyzers", []string{"os"})

// Service discovery configuration
config.BindEnvAndSetDefault("service_discovery.enabled", true)
config.BindEnvAndSetDefault("service_discovery.enabled", false)
bindEnvAndSetLogsConfigKeys(config, "service_discovery.forwarder.")

// Orchestrator Explorer - process agent
1 change: 0 additions & 1 deletion tasks/agent.py
Original file line number Diff line number Diff line change
@@ -75,7 +75,6 @@
"orchestrator_pod",
"orchestrator_ecs",
"cisco_sdwan",
"service_discovery",
]

WINDOWS_CORECHECKS = [
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ func TestLinuxConfigCheckSuite(t *testing.T) {
e2e.Run(t, &linuxConfigCheckSuite{}, e2e.WithProvisioner(awshost.ProvisionerNoFakeIntake()))
}

// cpu, disk, file_handle, io, load, memory, network, ntp, uptime, service_discovery
// cpu, disk, file_handle, io, load, memory, network, ntp, uptime
func (v *linuxConfigCheckSuite) TestDefaultInstalledChecks() {
testChecks := []CheckConfigOutput{
{
@@ -83,12 +83,6 @@ func (v *linuxConfigCheckSuite) TestDefaultInstalledChecks() {
InstanceID: "uptime:",
Settings: "{}",
},
{
CheckName: "service_discovery",
Filepath: "file:/etc/datadog-agent/conf.d/service_discovery.d/conf.yaml.default",
InstanceID: "service_discovery:",
Settings: "{}",
},
}

output := v.Env().Agent.Client.ConfigCheck(agentclient.WithArgs([]string{"-n"}))

0 comments on commit 0b4dd17

Please sign in to comment.