diff --git a/manifests/init.pp b/manifests/init.pp index 26febfe5..0f5479f2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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: # @@ -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. @@ -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', []) diff --git a/manifests/integrations/jmx.pp b/manifests/integrations/jmx.pp index 038a7a97..64cff15f 100644 --- a/manifests/integrations/jmx.pp +++ b/manifests/integrations/jmx.pp @@ -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. diff --git a/spec/classes/datadog_agent_spec.rb b/spec/classes/datadog_agent_spec.rb index 8c0e5780..0ed41045 100644 --- a/spec/classes/datadog_agent_spec.rb +++ b/spec/classes/datadog_agent_spec.rb @@ -210,6 +210,7 @@ 'content' => /^apm_enabled: false\n/, )} end + end context 'with user provided paramaters' do @@ -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 diff --git a/templates/datadog_footer.conf.erb b/templates/datadog_footer.conf.erb index f418c0c3..6b6deaba 100644 --- a/templates/datadog_footer.conf.erb +++ b/templates/datadog_footer.conf.erb @@ -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 # # ========================================================================== #