-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add support for 'site' option. #582
Conversation
d3aaed9
to
c346b10
Compare
bef1e43
to
9339625
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, let me know what you think.
I think we should avoid storing values in the run_state
(see related comments). If we do end up using it, I think we should use the key ['datadog']['dd_url']
instead.
For dd-handler: - Use node['datadog']['url'] - If nil, use https://app.datadoghq.com For Agent 5: - Use node['datadog']['url'] - If nil, use https://app.datadoghq.com For Agent 6 (additional endpoints): - Use node['datadog']['site'] value to infer an intake url - If nil, use node['datadog']['url'] - If nil, use https://app.datadoghq.com For Agent 6 (dd_url / site): - Let the Agent decide by not setting the value in datadog.yaml
977ee66
to
500afa8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there! 😄
A few inline nits, and let's change the default value of the attribute node['datadog']['process_agent']['url']
to nil
. When it's set, the attribute is only written for the Agent v6's datadog.yaml
so there should be no need for additional changes.
also, can you add a short explanation in the PR description about why you can remove |
Agent 6.9.0 has a new option
site
to configure on which site (US/EU) the Agent data should be sent, simplifying the configuration process by avoiding to type complete URLs in theurl
configuration field.This pull-requests adds the attribute
site
in the Chef cookbook in order to use this option by default instead of theurl
one.Note that it doesn't remove anything about the
url
configuration field has it's still supported and has priority on thesite
value.The use of
DATADOG_HOST
has been removed: it was used by the chef-handler-datadog recipe to set the datadog host to use, however, the ruby lib dogapi-rb used already has a correct default value ifDATADOG_HOST
was not set and on top of that: DataDog/chef-handler-datadog#103 makes sure that a default value is set directly inside the recipe instead of in the ruby lib dogapi-rb.