Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@
# $apm_env
# String defining the environment for the APM traces
# String. Default: empty
# $process_agent_enabled
# Boolean to enable the process/container agent
# Boolean. Default: false
#
# Actions:
#
Expand Down Expand Up @@ -248,6 +251,7 @@
$dd_group = $datadog_agent::params::dd_group,
$apm_enabled = false,
$apm_env = '',
$process_agent_enabled = false,
) inherits datadog_agent::params {

# Allow ports to be passed as integers or strings.
Expand Down Expand Up @@ -321,6 +325,7 @@
validate_string($consul_token)
validate_bool($apm_enabled)
validate_string($apm_env)
validate_bool($process_agent_enabled)

if $hiera_tags {
$local_tags = hiera_array('datadog_agent::tags', [])
Expand Down
2 changes: 1 addition & 1 deletion manifests/integrations/jmx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# The JMX port.
# jmx_url:
# If the agent needs to connect to a non-default JMX URL, specify it here
# instead of a host and a port. If you use this you need to specify a name
# instead of a host and a port. If you use this you need to specify a 'name'
# for the instance. Optional.
# user:
# The username for connecting to the running JVM. Optional.
Expand Down
10 changes: 10 additions & 0 deletions spec/classes/datadog_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
'content' => /^apm_enabled: false\n/,
)}
end

end

context 'with user provided paramaters' do
Expand Down Expand Up @@ -610,6 +611,15 @@
'order' => '07',
)}
end
context 'with process_agent enabled' do
let(:params) {
{:process_agent_enabled => true,
}}
it { should contain_concat__fragment('datadog footer').with(
'content' => /^process_agent_enabled: true\n/,
)}
end

end
end

Expand Down
4 changes: 4 additions & 0 deletions templates/datadog_footer.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ sd_jmx_enable: <%= @sd_jmx_enable %>
consul_token: <%= @consul_token %>
<% end -%>

<% if @process_agent_enabled -%>
process_agent_enabled: <%= @process_agent_enabled %>
<% end -%>

# ========================================================================== #
# Trace #
# ========================================================================== #
Expand Down