Skip to content

Commit

Permalink
adding ValuesAbsolute and ValuesPercentage for swap as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Heerschap committed Jul 24, 2015
1 parent f7af2f2 commit 112eb71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 9 additions & 5 deletions manifests/plugin/swap.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# https://collectd.org/wiki/index.php/Plugin:Swap
class collectd::plugin::swap (
$ensure = present,
$interval = undef,
$reportbydevice = false,
$reportbytes = true,
$ensure = present,
$interval = undef,
$reportbydevice = false,
$reportbytes = true,
$valuesabsolute = true,
$valuespercentage = false,
) {
validate_bool(
$reportbydevice,
$reportbytes
$reportbytes,
$valuesabsolute,
$valuespercentage
)

collectd::plugin {'swap':
Expand Down
4 changes: 4 additions & 0 deletions templates/plugin/swap.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<% if @collectd_version and scope.function_versioncmp([@collectd_version, '5.2']) > 0 -%>
ReportBytes <%= @reportbytes %>
<% end -%>
<% if @collectd_version and scope.function_versioncmp([@collectd_version, '5.5']) > 0 -%>
ValuesAbsolute = <%= @valuesabsolute %>
ValuesPercentage = <%= @valuespercentage %>
<% end -%>
</Plugin>

0 comments on commit 112eb71

Please sign in to comment.