Skip to content

Commit

Permalink
add no_proxy option (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith authored and olivielpeau committed Jul 16, 2018
1 parent 6c1722c commit f6f6575
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
default['datadog']['web_proxy']['user'] = nil
default['datadog']['web_proxy']['password'] = nil
default['datadog']['web_proxy']['skip_ssl_validation'] = nil # accepted values 'yes' or 'no'
default['datadog']['web_proxy']['no_proxy'] = nil # only used for agent v6.0+

# dogstatsd
default['datadog']['dogstatsd'] = true
Expand Down
3 changes: 3 additions & 0 deletions templates/default/datadog.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ end

# TODO: support the more complete proxy settings that the agent6 supports
http_proxy = nil
no_proxy = nil
if node['datadog']['web_proxy']['host']
host = node['datadog']['web_proxy']['host']
port = node['datadog']['web_proxy']['port']
user = node['datadog']['web_proxy']['user']
password = node['datadog']['web_proxy']['password']
scheme = ""
no_proxy = node['datadog']['web_proxy']['no_proxy']

unless host.start_with?('http://') or host.start_with?('https://')
scheme = 'http://'
Expand Down Expand Up @@ -134,6 +136,7 @@ if !http_proxy.nil?
http: http_proxy,
https: http_proxy
}
agent_config['proxy']['no_proxy'] = no_proxy if !no_proxy.nil?
end

## Trace agent options ##
Expand Down

0 comments on commit f6f6575

Please sign in to comment.