Skip to content

Commit

Permalink
Support LogSendErrors on the write_graphite plugin
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
zoni committed Dec 5, 2014
1 parent 4fa9f16 commit 86962bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/plugin/write_graphite.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions templates/plugin/write_graphite.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
Expand Down

0 comments on commit 86962bb

Please sign in to comment.