Skip to content

Commit

Permalink
Add an attribute to enable dd_check tag collection
Browse files Browse the repository at this point in the history
Verified using test kitchen.
  • Loading branch information
Etienne LAFARGE committed Jul 29, 2015
1 parent 448e3a9 commit 5daa750
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
# `env:node.chef_environment`, `role:node.node.run_list.role`, `tag:somecheftag`
default['datadog']['tags'] = ''

# Add one "dd_check:checkname" tag per running check. It makes it possible to slice
# and dice per monitored app (= running Agent Check) on Datadog's backend.
default['datadog']['create_dd_check_tags'] = nil

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

Expand Down
3 changes: 3 additions & 0 deletions templates/default/datadog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ autorestart: <%= node['datadog']['autorestart'] %>
<% end -%>

tags: <%= node['datadog']['tags'] %>
<% if node['datadog']['create_dd_check_tags'] -%>
create_dd_check_tags: <%= node['datadog']['create_dd_check_tags'] %>
<% end -%>
<% if node['datadog']['collect_ec2_tags'] -%>
collect_ec2_tags: <%= node['datadog']['collect_ec2_tags'] %>
<% end -%>
Expand Down

0 comments on commit 5daa750

Please sign in to comment.