Puppet Class: collectd::plugin::write_network

Defined in:
manifests/plugin/write_network.pp

Overview

A define to make a generic network output for collectd

Parameters:

  • ensure (Any) (defaults to: 'present')
  • servers (Hash) (defaults to: { 'localhost' => { 'serverport' => '25826' } })


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'manifests/plugin/write_network.pp', line 2

class collectd::plugin::write_network (
  $ensure       = 'present',
  Hash $servers = { 'localhost'  => { 'serverport' => '25826' } },
) {
  include collectd

  $servernames = keys($servers)
  if empty($servernames) {
    fail('servers cannot be empty')
  }

  $servername = $servernames[0]
  $serverport = $servers[$servername]['serverport']

  class { 'collectd::plugin::network':
    server     => $servername,
    serverport => $serverport,
  }
}