1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#== Class: collectd::plugin::battery
#
# Class to manage battery write plugin for collectd
#
# Documentation:
# https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_battery
#
# === Parameters
#
# [*ensure*]
# Ensure param for collectd::plugin type.
# Defaults to 'ensure'
#
# [*interval*]
# Interval setting for the plugin
# Defaults to undef
#
# [*values_percentage*]
# When enabled, remaining capacity is reported as a percentage instead of raw
# data (most likely in "Wh")
# Defaults to false
#
# [*report_degraded*]
# When set to true, the battery plugin will report three values: charged
# (remaining capacity), discharged (difference between "last full capacity"
# and "remaining capacity") and degraded (difference between "design capacity"
# and "last full capacity"). Otherwise only the remaining capacity is
# reported.
# Defaults to false
#
# [*query_state_fs*]
# When set to true, the battery plugin will only read statistics related to
# battery performance as exposed by StateFS at /run/state.
# Defaults to false
#
class collectd::plugin::battery (
Enum['present', 'absent'] $ensure = 'present',
Optional[Integer] $interval = undef,
Boolean $values_percentage = false,
Boolean $report_degraded = false,
Boolean $query_state_fs = false,
) {
include collectd
collectd::plugin { 'battery':
ensure => $ensure,
interval => $interval,
content => epp('collectd/plugin/battery.conf.epp'),
}
}
|