[FEATURE] Allow configuration of logs_agent via `datadog['logs_agent_config']`
MODIFY
CHANGELOG.md
CHANGELOG.md
Changes
=======
+
+* [FEATURE] Allow configuration of logs_agent via `datadog['logs_agent_config']`
+
# 4.1.1 / 2020-01-21
* [BUGFIX] Fix version formating for Linuxes that use yum. See [#685][] [@albertvaka][]

MODIFY
attributes/default.rb
attributes/default.rb
@@ -354,6 +354,11 @@ default['datadog']['system_probe']['enable_conntrack'] = false
# * `false` to explicitly disable it
# Leave it to `nil` to let the agent's default behavior decide whether to run the log-agent
default['datadog']['enable_logs_agent'] = nil
+default['datadog']['logs_agent_config'] = nil
+# {
+# 'use_http' => false,
+# 'use_compression' => true
+# }
# For custom gem servers on restricted networks
# This attribute only works on Chef >= 12.3

MODIFY
templates/default/datadog.yaml.erb
templates/default/datadog.yaml.erb
@@ -103,6 +103,10 @@ if node['datadog']['statsd_forward_host']
agent_config['statsd_forward_port'] = node['datadog']['statsd_forward_port']
end
+if node['datadog']['logs_agent_config']
+ agent_config['logs_config'] = node['datadog']['logs_agent_config']
+end
+
if node['datadog']['log_file_directory']
agent_config['log_file'] = ::File.join(node['datadog']['log_file_directory'], "agent.log")
end

[FEATURE] Allow configuration of logs_agent via `datadog['logs_agent_config']`