From 86962bb964172ab5193498f64e26f98dbc5530fb Mon Sep 17 00:00:00 2001 From: Nick Groenen Date: Fri, 5 Dec 2014 09:54:12 +0100 Subject: [PATCH] Support LogSendErrors on the write_graphite plugin From [collectd.conf(5)](http://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_write_graphite): ``` LogSendErrors false|true If set to true (the default), logs errors when sending data to Graphite. If set to false, it will not log the errors. This is especially useful when using Protocol UDP since many times we want to use the "fire-and-forget" approach and logging errors fills syslog with unneeded messages. ``` --- manifests/plugin/write_graphite.pp | 2 ++ templates/plugin/write_graphite.conf.erb | 1 + 2 files changed, 3 insertions(+) diff --git a/manifests/plugin/write_graphite.pp b/manifests/plugin/write_graphite.pp index c2a19aaf0..b9d646faf 100644 --- a/manifests/plugin/write_graphite.pp +++ b/manifests/plugin/write_graphite.pp @@ -10,9 +10,11 @@ $alwaysappendds = false, $protocol = 'tcp', $separateinstances = false, + $logsenderrors = true, ) { validate_bool($storerates) validate_bool($separateinstances) + validate_bool($logsenderrors) collectd::plugin {'write_graphite': ensure => $ensure, diff --git a/templates/plugin/write_graphite.conf.erb b/templates/plugin/write_graphite.conf.erb index ccc5efab0..6b92f9654 100644 --- a/templates/plugin/write_graphite.conf.erb +++ b/templates/plugin/write_graphite.conf.erb @@ -10,6 +10,7 @@ StoreRates <%= @storerates %> AlwaysAppendDS <%= @alwaysappendds %> SeparateInstances <%= @separateinstances %> + LogSendErrors <%= @logsenderrors %> <% if @collectd_version and (scope.function_versioncmp([@collectd_version, '5.4']) >= 0) -%> Protocol "<%= @protocol %>" <% end -%>