chef-datadog icon indicating copy to clipboard operation
chef-datadog copied to clipboard

Add Datadog Custom Log Management Functionality

Open danielcbright opened this issue 5 years ago • 0 comments

Adding Log Management Functionality as a Built-in

This is to track the adding of the Log Management Functionality into the Datadog cookbook.

I already have a working recipe that looks like this:

include_recipe 'datadog::dd-agent'

# Logs Integration
#
# Here is the description of acceptable attributes:
# default['datadog']['logs_conf'] = {
#   'instances' = [
#     {
#       'type': 'file',
#       'path': '/path/to/log',
#       'service': 'service',
#       'source': 'source',
#       'sourcecategory': 'sourcecategory',
#       'tags' = [
#         '<KEY_1>:<VALUE_1>',
#         '<KEY_2>:<VALUE_2>',
#       ],
#       'log_processing_rules' = {
#         'type': 'multi_line',
#         'pattern': '\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])',
#         'name': 'new_log_start_with_date',
#       },
#     },
#   ],
# }

datadog_monitor 'logs_conf' do
  instances node['datadog']['logs_conf']['instances']
  use_integration_template false
  action :add
  notifies :restart, 'service[datadog-agent]' if node['datadog']['agent_start']
end

I'm trying to figure out what other attributes I should add, those are the ones I could find on the integrations page in DD.

danielcbright avatar Jan 21 '21 01:01 danielcbright