From 88fb530314aa0641e6a48540b82d26d379cf9dfe Mon Sep 17 00:00:00 2001 From: Micha Krause Date: Thu, 22 Jan 2015 11:13:15 +0100 Subject: [PATCH] added CollectStatistics option to rrdcached plugin --- manifests/plugin/rrdcached.pp | 23 ++++++++++++----------- templates/plugin/rrdcached.conf.erb | 3 +++ 2 files changed, 15 insertions(+), 11 deletions(-) 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 -%>