Add configuration for custom_log_collection
This pull request allows to create a config file for the custom_log_collection DataDog integration.
It works the same as adding a log file configuration for an integration using this cookbook.
ADD
recipes/custom_log_collection.rb
+include_recipe '::dd-agent'
+
+# node.default['datadog']['custom_log_collection']['logs'] = [
+# {
+# 'type' => 'file',
+# 'path' => '</path/to/logfile>',
+# 'source' => '<source>',
+# 'tags' => [
+# 'tag1:value1',
+# 'tag2:value2'
+# ]
+# }
+# ]
+
+datadog_monitor 'custom_log_collection' do
+ logs node['datadog']['custom_log_collection']['logs']
+ action :add
+ notifies :restart, 'service[datadog-agent]' if node['datadog']['agent_start']
+end

ADD
templates/default/custom_log_collection.yaml.erb
+<%= JSON.parse(({'logs' => @logs }).to_json).to_yaml -%>

Add configuration for custom_log_collection (#861)

This pull request allows to create a config file for the custom_log_collection DataDog integration.

It works the same as adding a log file configuration for an integration using this cookbook.