Puppet Class: collectd::plugin::table

Defined in:
manifests/plugin/table.pp

Summary

Load and configure the table plugin

Overview

Examples:

Parse ‘/proc/pressure/cpu`

class {'collectd::plugin::table':
  tables => {
    '/proc/pressure/cpu' => {
      'plugin'    => 'psi',
      'instance   => 'cpu',
      'seperator' => ' =',
      'results'   => [{
        'type'            => 'gauge',
        'instance_from'   => [0],
        'instance_prefix' => 'arg10',
        'values_from'     => [2],
      }],
    }
  }
}

Parameters:

  • tables (Optional[Hash[String, Collectd::Table::Table, 1]]) (defaults to: undef)

    ‘<Table>` blocks for table plugin

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    Should the plugin be configured

  • order (Integer) (defaults to: 10)

    Prefix of file in collectd config directory

See Also:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/plugin/table.pp', line 25

class collectd::plugin::table (
  Optional[Hash[String, Collectd::Table::Table, 1]] $tables = undef,
  Enum['present', 'absent'] $ensure                         = 'present',
  Integer $order                                            = 10,
) {
  include collectd

  $_content = $tables ? {
    Undef   => undef,
    default => epp('collectd/plugin/table.conf.epp', { 'tables' => $tables }),
  }

  collectd::plugin { 'table':
    ensure  => $ensure,
    content => $_content,
    order   => $order,
  }
}