Defined Type: collectd::plugin::snmp::host

Defined in:
manifests/plugin/snmp/host.pp

Overview

Parameters:

  • collect (Variant[String[1], Array[String[1], 1]])
  • ensure (Enum['present', 'absent']) (defaults to: 'present')
  • address (String[1]) (defaults to: $name)
  • version (Collectd::SNMP::Version) (defaults to: '1')
  • interval (Optional[Integer[0]]) (defaults to: undef)
  • community (String[1]) (defaults to: 'public')
  • username (Optional[String[1]]) (defaults to: undef)
  • security_level (Optional[Collectd::SNMP::SecurityLevel]) (defaults to: undef)
  • context (Optional[String[1]]) (defaults to: undef)
  • auth_protocol (Optional[Collectd::SNMP::AuthProtocol]) (defaults to: undef)
  • auth_passphrase (Optional[String[1]]) (defaults to: undef)
  • privacy_protocol (Optional[Collectd::SNMP::PrivacyProtocol]) (defaults to: undef)
  • privacy_passphrase (Optional[String[1]]) (defaults to: undef)


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
# File 'manifests/plugin/snmp/host.pp', line 2

define collectd::plugin::snmp::host (
  Variant[String[1], Array[String[1], 1]]   $collect,
  Enum['present', 'absent']                 $ensure             = 'present',
  String[1]                                 $address            = $name,
  Collectd::SNMP::Version                   $version            = '1',
  Optional[Integer[0]]                      $interval           = undef,
  # SNMPv1/2c
  String[1]                                 $community          = 'public',
  # SNMPv3
  Optional[String[1]]                       $username           = undef,
  Optional[Collectd::SNMP::SecurityLevel]   $security_level     = undef,
  Optional[String[1]]                       $context            = undef,
  Optional[Collectd::SNMP::AuthProtocol]    $auth_protocol      = undef,
  Optional[String[1]]                       $auth_passphrase    = undef,
  Optional[Collectd::SNMP::PrivacyProtocol] $privacy_protocol   = undef,
  Optional[String[1]]                       $privacy_passphrase = undef,
) {
  include collectd
  include collectd::plugin::snmp

  $conf_dir   = $collectd::plugin_conf_dir

  file { "snmp-host-${name}.conf":
    ensure  => $ensure,
    path    => "${conf_dir}/25-snmp-host-${name}.conf",
    owner   => $collectd::config_owner,
    group   => $collectd::config_group,
    mode    => $collectd::config_mode,
    content => template('collectd/plugin/snmp/host.conf.erb'),
    notify  => Service[$collectd::service_name];
  }
}