File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 235235 $sd_backend_host = ' ' ,
236236 $sd_backend_port = 0,
237237 $sd_template_dir = ' ' ,
238+ $sd_jmx_enable = false ,
238239 $consul_token = ' ' ,
239240 $conf_dir = $datadog_agent::params::conf_dir,
240241 $service_name = $datadog_agent::params::service_name,
299300 validate_string($sd_backend_host )
300301 validate_integer($sd_backend_port )
301302 validate_string($sd_template_dir )
303+ validate_bool($sd_jmx_enable )
302304 validate_string($consul_token )
303305
304306 if $hiera_tags {
Original file line number Diff line number Diff line change 199199 it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . without (
200200 'content' => /^consul_token:\n / ,
201201 ) }
202+ it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . with (
203+ 'content' => /^# sd_jmx_enable: no\n / ,
204+ ) }
202205 end
203206 end
204207
503506 :sd_config_backend => 'etcd' ,
504507 :sd_backend_host => 'localhost' ,
505508 :sd_backend_port => '8080' ,
509+ :sd_jmx_enable => true ,
506510 } }
507511 it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . with (
508512 'content' => /^service_discovery_backend: docker\n / ,
516520 it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . with (
517521 'content' => /^sd_backend_port: 8080\n / ,
518522 ) }
523+ it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . with (
524+ 'content' => /^sd_jmx_enable: true\n / ,
525+ ) }
519526 end
520527 end
521528 end
Original file line number Diff line number Diff line change @@ -387,6 +387,13 @@ sd_backend_port: <%= @sd_backend_port %>
387387sd_template_dir: <%= @sd_template_dir %>
388388<% end -%>
389389
390+ # Enable JMX checks for service discovery
391+ <% if @sd_jmx_enable -%>
392+ sd_jmx_enable: <%= @sd_jmx_enable %>
393+ <% else -%>
394+ # sd_jmx_enable: no
395+ <% end -%>
396+
390397# If you Consul store requires token authentication for service discovery, you can define that token here.
391398<% if @consul_token.empty? -%>
392399# consul_token: f45cbd0b-5022-samp-le00-4eaa7c1f40f1
You can’t perform that action at this time.
0 commit comments