Skip to content

Commit

Permalink
add option to specify ec2 tag collection
Browse files Browse the repository at this point in the history
Resolves #159

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
Mircea authored and miketheman committed Jan 27, 2015
1 parent 67dcb6a commit e0cd3ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions attributes/default.rb
Expand Up @@ -33,6 +33,9 @@
# Add tags as override attributes in your role
default['datadog']['tags'] = ''

# Collect EC2 tags, set to 'yes' to collect
default['datadog']['collect_ec2_tags'] = nil

# Autorestart agent
default['datadog']['autorestart'] = false

Expand Down
5 changes: 5 additions & 0 deletions templates/default/datadog.conf.erb
Expand Up @@ -12,7 +12,12 @@ bind_host: <%= node['datadog']['bind_host'] %>
<% if node['datadog']['autorestart'] -%>
autorestart: <%= node['datadog']['autorestart'] %>
<% end -%>

tags: <%= node['datadog']['tags'] %>
<% if node['datadog']['collect_ec2_tags'] -%>
collect_ec2_tags: <%= node['datadog']['collect_ec2_tags'] %>
<% end -%>
<% if node['datadog']['web_proxy']['host'] -%>
proxy_host: <%= node['datadog']['web_proxy']['host'] %>
proxy_port: <%= node['datadog']['web_proxy']['port'] %>
Expand Down

0 comments on commit e0cd3ae

Please sign in to comment.