Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2000,15 +2000,16 @@ backend should have unique title:

```puppet
collectd::plugin::write_graphite::carbon {'secondary_graphite':
graphitehost => 'graphite.example.org',
graphiteport => 2004,
graphiteprefix => '',
protocol => 'udp',
escapecharacter => '_',
alwaysappendds => true,
storerates => true,
separateinstances => false,
logsenderrors => true
graphitehost => 'graphite.example.org',
graphiteport => 2004,
graphiteprefix => '',
protocol => 'udp',
dropduplicatefields => false,
escapecharacter => '_',
alwaysappendds => true,
storerates => true,
separateinstances => false,
logsenderrors => true
}
```

Expand Down
29 changes: 15 additions & 14 deletions manifests/plugin/write_graphite/carbon.pp
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# a single graphite backend
define collectd::plugin::write_graphite::carbon (
$ensure = 'present',
Stdlib::Host $graphitehost = 'localhost',
Stdlib::Port $graphiteport = 2003,
Boolean $storerates = true,
$graphiteprefix = 'collectd.',
$graphitepostfix = undef,
$interval = undef,
$escapecharacter = '_',
Boolean $alwaysappendds = false,
$protocol = 'tcp',
Boolean $separateinstances = false,
Boolean $logsenderrors = true,
Integer $reconnectinterval = 0,
Boolean $reversehost = false,
$ensure = 'present',
Stdlib::Host $graphitehost = 'localhost',
Stdlib::Port $graphiteport = 2003,
Boolean $storerates = true,
$graphiteprefix = 'collectd.',
$graphitepostfix = undef,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add something to the existing tests in spec/defines/collectd_plugin_write_graphite_spec.rb to exercise this new parameter.

$interval = undef,
Boolean $dropduplicatefields = false,
$escapecharacter = '_',
Boolean $alwaysappendds = false,
$protocol = 'tcp',
Boolean $separateinstances = false,
Boolean $logsenderrors = true,
Integer $reconnectinterval = 0,
Boolean $reversehost = false,
) {
include collectd
include collectd::plugin::write_graphite
Expand Down
1 change: 1 addition & 0 deletions templates/plugin/write_graphite/carbon.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<%- if @graphitepostfix -%>
Postfix "<%= @graphitepostfix %>"
<%- end -%>
DropDuplicateFields "<%= @dropduplicatefields %>"
EscapeCharacter "<%= @escapecharacter %>"
StoreRates <%= @storerates %>
AlwaysAppendDS <%= @alwaysappendds %>
Expand Down