Skip to content

Commit 3a8c1c3

Browse files
committed
Ensure dd_url is empty by default for agent 6
1 parent 20998bf commit 3a8c1c3

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

manifests/init.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
#
205205
#
206206
class datadog_agent(
207-
$dd_url = 'https://app.datadoghq.com',
207+
$dd_url = '',
208208
$site = $datadog_agent::params::default_site,
209209
$host = '',
210210
$api_key = 'your_API_key',
@@ -492,6 +492,11 @@
492492
require => File['/etc/dd-agent'],
493493
}
494494

495+
if ($dd_url == '') {
496+
$_dd_url = 'app.datadoghq.com'
497+
} else {
498+
$_dd_url = $dd_url
499+
}
495500
concat::fragment{ 'datadog header':
496501
target => '/etc/dd-agent/datadog.conf',
497502
content => template('datadog_agent/datadog_header.conf.erb'),

templates/datadog_header.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[Main]
55

66
# The host of the Datadog intake server to send agent data to
7-
dd_url: <%= @dd_url %>
7+
dd_url: <%= @_dd_url %>
88

99
# If you need a proxy to connect to the Internet, provide the settings here
1010
<% if @proxy_host.empty? -%>

0 commit comments

Comments
 (0)