File: hugepages.pp

package info (click to toggle)
puppet-module-voxpupuli-collectd 11.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,308 kB
  • sloc: ruby: 8,119; python: 30; sh: 10; makefile: 4
file content (59 lines) | stat: -rw-r--r-- 1,694 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
#== Class: collectd::plugin::hugepages
#
# Class to manage hugepages write plugin for collectd
#
# Documentation:
#   https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_hugepages
#
# === Parameters
#
# [*ensure*]
#  Ensure param for collectd::plugin type.
#  Defaults to 'ensure'
#
# [*interval*]
#  Interval setting for the plugin
#  Defaults to undef
#
# [*report_per_node_hp*]
#  If enabled, information will be collected from the hugepage counters in
#  "/sys/devices/system/node/*/hugepages". This is used to check the per-node
#  hugepage statistics on a NUMA system.
#  Defaults to true
#
# [*report_root_hp*]
#  If enabled, information will be collected from the hugepage counters in
#  "/sys/kernel/mm/hugepages". This can be used on both NUMA and non-NUMA
#  systems to check the overall hugepage statistics.
#  Defaults to true
#
# [*values_pages*]
#  Whether to report hugepages metrics in number of pages
#  Defaults to true
#
# [*values_bytes*]
#  Whether to report hugepages metrics in bytes
#  Defaults to false
#
# [*values_percentage*]
#  Whether to report hugepages metrics in percentage
#  Defaults to false
#
class collectd::plugin::hugepages (
  Enum['present', 'absent'] $ensure   = 'present',
  Optional[Integer] $interval         = undef,
  Boolean $report_per_node_hp         = true,
  Boolean $report_root_hp             = true,
  Boolean $values_pages               = true,
  Boolean $values_bytes               = false,
  Boolean $values_percentage          = false,
) {

  include collectd

  collectd::plugin { 'hugepages':
    ensure   => $ensure,
    interval => $interval,
    content  => epp('collectd/plugin/hugepages.conf.epp'),
  }
}