Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datadog/chef-handler-datadog#85 - adding the ability to blacklist the… #347

Closed
Closed
Show file tree
Hide file tree
Changes from 2 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
7 changes: 7 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
# Collect EC2 tags, set to 'yes' to collect
default['datadog']['collect_ec2_tags'] = nil

# Set this regex to exclude some Chef node tags from the host tags that the datadog handler sends to Datadog
# https://github.com/DataDog/chef-handler-datadog/issues/85
# This means that all the metrics and service checks coming from the
# host/Agent would also stop being tagged with these excluded tags.
# EX: 'app_.*' allows all tags except those which look like app_.*
default['datadog']['tags_blacklist_regex'] = nil

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

Expand Down
3 changes: 2 additions & 1 deletion recipes/dd-handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
:use_ec2_instance_id => node['datadog']['use_ec2_instance_id'],
:tag_prefix => node['datadog']['tag_prefix'],
:url => node['datadog']['url'],
:extra_endpoints => extra_endpoints
:extra_endpoints => extra_endpoints,
:tags_blacklist_regex => ['datadog']['tags_blacklist_regex']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

['datadog']['tags_blacklist_regex'] should read node['datadog']['tags_blacklist_regex'] instead

}

unless node['datadog']['use_ec2_instance_id']
Expand Down