File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 362362 }
363363
364364 file { '/etc/dd-agent' :
365- ensure => present ,
366- owner => ' root ' ,
367- group => ' root ' ,
365+ ensure => directory ,
366+ owner => $dd_user ,
367+ group => $dd_group ,
368368 mode => ' 0755' ,
369369 require => Package[' datadog-agent' ],
370370 }
Original file line number Diff line number Diff line change 1717# Optional array of tags
1818# $keys
1919# Optional array of keys to check length
20+ # $command_stats
21+ # Collect INFO COMMANDSTATS output as metrics
2022#
2123# Sample Usage:
2224#
3436 $tags = [],
3537 $keys = [],
3638 $warn_on_missing_keys = true ,
39+ $command_stats = false ,
40+
3741) inherits datadog_agent::params {
3842 include datadog_agent
3943
4044 validate_array($tags )
4145 validate_array($keys )
4246 validate_bool($warn_on_missing_keys )
47+ validate_bool($command_stats )
4348
4449 if $ports == undef {
4550 $_ports = [ $port ]
Original file line number Diff line number Diff line change 2828 it { should contain_file ( conf_file ) . without_content ( %r{tags:} ) }
2929 it { should contain_file ( conf_file ) . without_content ( %r{\b keys:} ) }
3030 it { should contain_file ( conf_file ) . with_content ( %r{warn_on_missing_keys: true} ) }
31+ it { should contain_file ( conf_file ) . with_content ( %r{command_stats: false} ) }
3132 end
3233
3334 context 'with parameters set' do
3940 tags : %w{ foo bar } ,
4041 keys : %w{ baz bat } ,
4142 warn_on_missing_keys : false ,
43+ command_stats : true ,
4244 } }
4345 it { should contain_file ( conf_file ) . with_content ( %r{host: redis1} ) }
4446 it { should contain_file ( conf_file ) . with_content ( %r{^[^#]*password: hunter2} ) }
4749 it { should contain_file ( conf_file ) . with_content ( %r{tags:.*\s +- foo\s +- bar} ) }
4850 it { should contain_file ( conf_file ) . with_content ( %r{keys:.*\s +- baz\s +- bat} ) }
4951 it { should contain_file ( conf_file ) . with_content ( %r{warn_on_missing_keys: false} ) }
52+ it { should contain_file ( conf_file ) . with_content ( %r{command_stats: true} ) }
5053 end
5154
5255end
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ instances:
99 - host: <%= @host %>
1010 port: <%= port %>
1111 warn_on_missing_keys: <%= @warn_on_missing_keys %>
12+ command_stats: <%= @command_stats %>
1213 <% if @password.empty? %> # <% end %> password: <%= @password %>
1314 # unix_socket_path: /var/run/redis/redis.sock # optional, can be used in lieu of host/port
1415 <% if @slowlog_max_len.empty? %> # <% end %> slowlog-max-len: <%= @slowlog_max_len %>
You can’t perform that action at this time.
0 commit comments