diff --git a/attributes/default.rb b/attributes/default.rb index 63941690..9e60aac8 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -116,6 +116,8 @@ default['datadog']['dogstatsd_port'] = 8125 default['datadog']['dogstatsd_interval'] = 10 default['datadog']['dogstatsd_normalize'] = 'yes' +default['datadog']['statsd_forward_host'] = nil +default['datadog']['statsd_forward_port'] = 8125 # For service-specific configuration, use the integration recipes included # in this cookbook, and apply them to the appropirate node's run list. diff --git a/templates/default/datadog.conf.erb b/templates/default/datadog.conf.erb index 21f2c090..b92a1867 100644 --- a/templates/default/datadog.conf.erb +++ b/templates/default/datadog.conf.erb @@ -48,6 +48,10 @@ dogstatsd_interval: <%= node['datadog']['dogstatsd_interval'] %> ## If 'yes', counters and rates will be normalized to 1 second (that is divided ## by the dogstatsd_interval) before being sent to the server. Defaults to 'yes' dogstatsd_normalize: <%= node['datadog']['dogstatsd_normalize'] %> +<% if node['datadog']['statsd_forward_host'] -%> +statsd_forward_host: <%= node['datadog']['statsd_forward_host'] %> +statsd_forward_port: <%= node['datadog']['statsd_forward_port'] %> +<% end -%> <% end -%> # ========================================================================== #