Skip to content

Commit

Permalink
service discovery: Add check yaml by default (#29033)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyarb authored Sep 4, 2024
1 parent b5758df commit af2cae3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/agent/dist/conf.d/service_discovery.d/conf.yaml.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
instances:
- {}
3 changes: 3 additions & 0 deletions omnibus/config/software/datadog-agent-finalize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
# 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
Expand Down
1 change: 1 addition & 0 deletions tasks/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"orchestrator_ecs",
"cisco_sdwan",
"network_path",
"service_discovery",
]

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

// cpu, disk, file_handle, io, load, memory, network, ntp, uptime
// cpu, disk, file_handle, io, load, memory, network, ntp, uptime, service_discovery
func (v *linuxConfigCheckSuite) TestDefaultInstalledChecks() {
testChecks := []CheckConfigOutput{
{
Expand Down Expand Up @@ -82,6 +82,12 @@ 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()
Expand Down

0 comments on commit af2cae3

Please sign in to comment.