Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@
default['datadog']['legacy_integrations']['nagios']['description'] = 'Nagios integration'
default['datadog']['legacy_integrations']['nagios']['config']['nagios_log'] = '/var/log/nagios3/nagios.log'

# Service discovery settings
# Enable with service_discovery_backend ('docker' is only valid option currently)
default['datadog']['sd_backend_host'] = '127.0.0.1'
default['datadog']['sd_backend_port'] = 4001
default['datadog']['sd_config_backend'] = 'etcd'
default['datadog']['sd_template_dir'] = '/datadog/check_configs'
default['datadog']['service_discovery_backend'] = nil

# Trace functionality settings
default['datadog']['enable_trace_agent'] = false
default['datadog']['extra_sample_rate'] = 1
Expand Down
26 changes: 26 additions & 0 deletions templates/default/datadog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,32 @@ graphite_listen_port: <%= node['datadog']['graphite_port'] %>
histogram_aggregates: <%= node['datadog']['histogram_aggregates'] %>
histogram_percentiles: <%= node['datadog']['histogram_percentiles'] %>

<% if node['datadog']['service_discovery_backend'] -%>
# ========================================================================== #
# Service Discovery #
# See https://docs.datadoghq.com/guides/servicediscovery/ for details #
# ========================================================================== #

# Service discovery allows the agent to look for running services
# and load a configuration object for the one it recognizes.
# This feature is disabled by default.
# Uncomment this line to enable it (works for docker containers only for now).
service_discovery_backend: <%= node['datadog']['service_discovery_backend'] %>

# Define which key/value store must be used to look for configuration templates.
# Default is etcd. Consul is also supported.
sd_config_backend: <%= node['datadog']['sd_config_backend'] %>

# Settings for connecting to the service discovery backend.
sd_backend_host: <%= node['datadog']['sd_backend_host'] %>
sd_backend_port: <%= node['datadog']['sd_backend_port'] %>

# By default, the agent will look for the configuration templates under the
# `/datadog/check_configs` key in the back-end. If you wish otherwise, uncomment this option
# and modify its value.
sd_template_dir: <%= node['datadog']['sd_template_dir'] %>
<% end -%>

<% if node['datadog']['dogstatsd'] -%>
# ========================================================================== #
# DogStatsd configuration #
Expand Down