diff --git a/attributes/default.rb b/attributes/default.rb index 78b04113..229e9d74 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -45,9 +45,8 @@ # 15 and 60 is a reasonable interval. default['datadog']['check_freq'] = 15 -# If running on ec2, use the instance-id as the host identifier -# rather than the hostname. -# If you have set up meaningful hostnames for your EC2 instances, set this to "no" +# If running on ec2, if true, use the instance-id as the host identifier +# rather than the hostname for the agent or nodename for chef-handler. default['datadog']['use_ec2_instance_id'] = false # Use mount points instead of volumes to track disk and fs metrics diff --git a/recipes/dd-handler.rb b/recipes/dd-handler.rb index bd5517c4..126f6473 100644 --- a/recipes/dd-handler.rb +++ b/recipes/dd-handler.rb @@ -40,7 +40,8 @@ source "chef/handler/datadog" arguments [ :api_key => node['datadog']['api_key'], - :application_key => node['datadog']['application_key'] + :application_key => node['datadog']['application_key'], + :use_ec2_instance_id => node['datadog']['use_ec2_instance_id'] ] supports :report => true, :exception => true action :nothing