diff --git a/manifests/plugin/rrdcached.pp b/manifests/plugin/rrdcached.pp index 92ee2f6fa..2f175a63e 100644 --- a/manifests/plugin/rrdcached.pp +++ b/manifests/plugin/rrdcached.pp @@ -1,16 +1,17 @@ # https://collectd.org/wiki/index.php/Rrdcached class collectd::plugin::rrdcached ( - $ensure = present, - $daemonaddress = 'unix:/tmp/rrdcached.sock', - $datadir = '/var/lib/rrdcached/db/collectd', - $createfiles = true, - $createfilesasync = false, - $stepsize = undef, - $heartbeat = undef, - $interval = undef, - $rrarows = undef, - $rratimespan = [], - $xff = undef, + $ensure = present, + $daemonaddress = 'unix:/tmp/rrdcached.sock', + $datadir = '/var/lib/rrdcached/db/collectd', + $createfiles = true, + $createfilesasync = false, + $stepsize = undef, + $heartbeat = undef, + $interval = undef, + $rrarows = undef, + $rratimespan = [], + $xff = undef, + $collectstatistics = undef, ) { validate_array($rratimespan) validate_bool($createfiles, $createfilesasync) diff --git a/templates/plugin/rrdcached.conf.erb b/templates/plugin/rrdcached.conf.erb index 0f7018c23..b469924d8 100644 --- a/templates/plugin/rrdcached.conf.erb +++ b/templates/plugin/rrdcached.conf.erb @@ -22,4 +22,7 @@ <% if @xff -%> XFF "<%= @xff %>" <% end -%> +<% unless @collectstatistics.nil? -%> + CollectStatistics "<%= @collectstatistics %>" +<% end -%>