Skip to content

Commit 09c32b8

Browse files
author
Jeff Frost
committed
Add support for process_agent_enabled
Process agent is in closed beta currently, but this will add support to the puppet module.
1 parent 3fd6759 commit 09c32b8

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

manifests/init.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@
157157
# $apm_env
158158
# String defining the environment for the APM traces
159159
# String. Default: empty
160+
# $process_agent_enabled
161+
# Boolean to enable the process/container agent
162+
# Boolean. Default: false
160163
#
161164
# Actions:
162165
#
@@ -248,6 +251,7 @@
248251
$dd_group = $datadog_agent::params::dd_group,
249252
$apm_enabled = false,
250253
$apm_env = '',
254+
$process_agent_enabled = false,
251255
) inherits datadog_agent::params {
252256

253257
# Allow ports to be passed as integers or strings.
@@ -321,6 +325,7 @@
321325
validate_string($consul_token)
322326
validate_bool($apm_enabled)
323327
validate_string($apm_env)
328+
validate_bool($process_agent_enabled)
324329

325330
if $hiera_tags {
326331
$local_tags = hiera_array('datadog_agent::tags', [])

spec/classes/datadog_agent_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
'content' => /^apm_enabled: false\n/,
211211
)}
212212
end
213+
213214
end
214215

215216
context 'with user provided paramaters' do
@@ -610,6 +611,15 @@
610611
'order' => '07',
611612
)}
612613
end
614+
context 'with process_agent enabled' do
615+
let(:params) {
616+
{:process_agent_enabled => true,
617+
}}
618+
it { should contain_concat__fragment('datadog footer').with(
619+
'content' => /^process_agent_enabled: true\n/,
620+
)}
621+
end
622+
613623
end
614624
end
615625

templates/datadog_footer.conf.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@ sd_jmx_enable: <%= @sd_jmx_enable %>
336336
consul_token: <%= @consul_token %>
337337
<% end -%>
338338

339+
<% if @process_agent_enabled -%>
340+
process_agent_enabled: <%= @process_agent_enabled %>
341+
<% end -%>
342+
339343
# ========================================================================== #
340344
# Trace #
341345
# ========================================================================== #

0 commit comments

Comments
 (0)