Puppet Class: collectd::plugin::snmp_agent

Defined in:
manifests/plugin/snmp_agent.pp

Overview

Class: collectd::plugin::snmp_agent

Parameters:

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

    String Passed to package and collectd::plugin resources (both). Default: present

  • data (Hash[String[1],Collectd::SNMP_AGENT::Data]) (defaults to: { 'memAvailReal' => { 'oids' => '1.3.6.1.4.1.2021.4.6.0', 'plugin' => 'memory', 'type' => 'memory', 'typeinstance' => 'free', }, })

    Optional[Hash[String,Collectd::SNMP_AGENT::Data]] Defines scalar field, must be put outside Table block.

  • table (Hash[String[1], Collectd::SNMP_AGENT::Table]) (defaults to: { 'ifTable' => { 'indexoid' => 'IF-MIB::ifIndex', 'sizeoid' => 'IF-MIB::ifNumber', 'data'=> { 'ifDescr' => { 'plugin' => 'interface', 'oids' => 'IF-MIB::ifDescr', 'indexkey' => { 'source' => 'PluginInstance', }, }, 'ifOctets' => { 'plugin' => 'interface', 'oids' => 'IF-MIB::ifInOctets" "IF-MIB::ifOutOctets', 'type' => 'if_octets', 'typeinstance' => '', }, }, }, })

    Hash[String, Collectd::SNMP_AGENT::Table] Defines a table consisting of several Data blocks being its columns

See Also:



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
# File 'manifests/plugin/snmp_agent.pp', line 10

class collectd::plugin::snmp_agent (
  Enum['present', 'absent'] $ensure = 'present',
  Hash[String[1],Collectd::SNMP_AGENT::Data] $data = {
    'memAvailReal' => {
      'oids' => '1.3.6.1.4.1.2021.4.6.0',
      'plugin' => 'memory',
      'type' => 'memory',
      'typeinstance' => 'free',
    },
  },
  Hash[String[1], Collectd::SNMP_AGENT::Table] $table = {
    'ifTable' => {
      'indexoid' => 'IF-MIB::ifIndex',
      'sizeoid' => 'IF-MIB::ifNumber',
      'data'=> {
        'ifDescr' => {
          'plugin'   => 'interface',
          'oids'     => 'IF-MIB::ifDescr',
          'indexkey' => {
            'source' => 'PluginInstance',
          },
        },
        'ifOctets' => {
          'plugin'   => 'interface',
          'oids'     => 'IF-MIB::ifInOctets" "IF-MIB::ifOutOctets',
          'type'     => 'if_octets',
          'typeinstance' => '',
        },
      },
    },
  }
) {
  include collectd

  collectd::plugin { 'snmp_agent':
    ensure  => $ensure,
    content => epp('collectd/plugin/snmp_agent.conf.epp', {
        'data'  => $data,
        'table' => $table
    }),
  }
}