Add a setting to disable writing system-probe.yaml
MODIFY
attributes/default.rb
attributes/default.rb
@@ -334,6 +334,10 @@ default['datadog']['process_agent']['container_interval'] = nil
default['datadog']['process_agent']['rtcontainer_interval'] = nil
# System probe functionality settings
+
+# Wheter this cookbook should write system-probe.yaml or not.
+# If set to false all other system-probe settings are ignored
+default['datadog']['system_probe']['manage_config'] = true
default['datadog']['system_probe']['enabled'] = false
# sysprobe_socket defines the unix socket location
default['datadog']['system_probe']['sysprobe_socket'] = '/opt/datadog-agent/run/sysprobe.sock'

MODIFY
recipes/dd-agent.rb
recipes/dd-agent.rb
@@ -145,14 +145,20 @@ service 'datadog-agent' do
retry_delay 5
end
-# only load system-probe recipe if an agent 6/7 installation comes with it
+
+system_probe_managed = node['datadog']['system_probe']['manage_config']
+if system_probe_managed
ruby_block 'include system-probe' do
block do
- if ::File.exist?('/opt/datadog-agent/embedded/bin/system-probe') && node['datadog']['agent_major_version'].to_i > 5 && !is_windows
+ # only load system-probe recipe if an agent 6/7 installation comes with it
+ system_probe_supported = !is_windows && node['datadog']['agent_major_version'].to_i > 5
+ system_probe_installed = ::File.exist?('/opt/datadog-agent/embedded/bin/system-probe')
+ if system_probe_supported && system_probe_installed
run_context.include_recipe 'datadog::system-probe'
end
end
end
+end
# Install integration packages
include_recipe 'datadog::integrations' unless is_windows

Add a setting to disable writing system-probe.yaml