Skip to content

Commit 04e5185

Browse files
authored
Merge pull request #352 from procore/jf/support_live_processes
Add support for process_agent_enabled
2 parents 319c163 + 2e8f2bf commit 04e5185

4 files changed

Lines changed: 20 additions & 1 deletion

File tree

manifests/init.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@
163163
# $apm_env
164164
# String defining the environment for the APM traces
165165
# String. Default: empty
166+
# $process_agent_enabled
167+
# Boolean to enable the process/container agent
168+
# Boolean. Default: false
166169
#
167170
# Actions:
168171
#
@@ -259,6 +262,7 @@
259262
$dd_groups = $datadog_agent::params::dd_groups,
260263
$apm_enabled = false,
261264
$apm_env = '',
265+
$process_agent_enabled = false,
262266
) inherits datadog_agent::params {
263267

264268
# Allow ports to be passed as integers or strings.
@@ -334,6 +338,7 @@
334338
validate_bool($apm_enabled)
335339
validate_bool($agent6_enable)
336340
validate_string($apm_env)
341+
validate_bool($process_agent_enabled)
337342

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

manifests/integrations/jmx.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# The JMX port.
2323
# jmx_url:
2424
# If the agent needs to connect to a non-default JMX URL, specify it here
25-
# instead of a host and a port. If you use this you need to specify a name
25+
# instead of a host and a port. If you use this you need to specify a 'name'
2626
# for the instance. Optional.
2727
# user:
2828
# The username for connecting to the running JVM. Optional.

spec/classes/datadog_agent_spec.rb

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

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

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)