Add configuration for the process-agent
Adds the flag for toggling the process-agent plus some additional
optional configuration around the process-agent behavior.
MODIFY
attributes/default.rb
attributes/default.rb
@@ -289,6 +289,38 @@ default['datadog']['ddtrace_python_version'] = nil
# ddtrace ruby gem version
default['datadog']['ddtrace_gem_version'] = nil
+# Live processes functionality settings
+# Set `enable_process_agent` to:
+# * `true` to explicitly enable the process agent
+# * `false` to explicitly disable it
+# Leave it to `nil` to let the agent's default behavior decide whether to run the process-agent
+default['datadog']['enable_process_agent'] = nil
+
+# Comma-separated list of regex patterns matching process commands to blacklist.
+# Example: 'my-secret-app,dbpass'
+default['datadog']['process_agent']['blacklist'] = nil
+
+# Comma-separated list of regex patterns of containers to include or skip.
+# Each pattern should be in the form of "field:pattern" where 'field' is either
+# 'image' or 'name'.
+# Example: 'image:redis,image:nginx'
+default['datadog']['process_agent']['container_blacklist'] = nil
+# Whitelist is applied after the blacklist.
+default['datadog']['process_agent']['container_whitelist'] = nil
+
+# Full path to store process-agent logs to override the default.
+default['datadog']['process_agent']['log_file'] = nil
+
+# If running in full process collection mode ('enable_process_agent' is true)
+# overrides the collection intervals for the full and real-time checks in seconds.
+default['datadog']['process_agent']['process_interval'] = nil
+default['datadog']['process_agent']['rtprocess_interval'] = nil
+
+# If only collecting containers ('enable_process_agent' is false but docker is available)
+# overrides the collection intervals for the full and real-time check.
+default['datadog']['process_agent']['container_interval'] = nil
+default['datadog']['process_agent']['rtcontainer_interval'] = nil
+
# For custom gem servers on restricted networks
# This attribute only works on Chef >= 12.3
# Change false to the URL of your custom gem server

MODIFY
templates/default/datadog.conf.erb
templates/default/datadog.conf.erb
@@ -178,6 +178,10 @@ end
<% end -%>
<% end -%>
+<% if node['datadog']['enabled_process_agent'].is_a?(TrueClass) || node['datadog']['enabled_process_agent'].is_a?(FalseClass) -%>
+process_agent_enabled: <%= node['datadog']['enabled_process_agent'] %>
+<% end -%>
+
## Trace settings
<% if node['datadog']['enable_trace_agent'].is_a?(TrueClass) || node['datadog']['enable_trace_agent'].is_a?(FalseClass) -%>
apm_enabled: <%= node['datadog']['enable_trace_agent'] %>
@@ -203,3 +207,31 @@ receiver_port: <%= node['datadog']['receiver_port'] %>
<% unless node['datadog']['connection_limit'].nil? -%>
connection_limit: <%= node['datadog']['connection_limit'] %>
<% end -%>
+
+## Process settings
+
+[process.config]
+<% unless node['datadog']['process_agent']['blacklist'].nil? -%>
+blacklist: <%= node['datadog']['process_agent']['blacklist'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['container_blacklist'].nil? -%>
+container_blacklist: <%= node['datadog']['process_agent']['container_blacklist'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['container_whitelist'].nil? -%>
+container_whitelist: <%= node['datadog']['process_agent']['container_whitelist'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['process_interval'].nil? -%>
+process_interval = <%= node['datadog']['process_agent']['process_interval'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['rtprocess_interval'].nil? -%>
+rtprocess_interval = <%= node['datadog']['process_agent']['rtprocess_interval'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['container_interval'].nil? -%>
+container_interval = <%= node['datadog']['process_agent']['container_interval'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['rtcontainer_interval'].nil? -%>
+rtcontainer_interval = <%= node['datadog']['process_agent']['rtcontainer_interval'] %>
+<% end -%>
+<% unless node['datadog']['process_agent']['log_file'].nil? -%>
+log_file: <%= node['datadog']['process_agent']['log_file'] %>
+<% end -%>

Add configuration for the process-agent (#465)

Adds the flag for toggling the process-agent plus some additional
optional configuration around the process-agent behavior.