Puppet Class: collectd::plugin::ping

Defined in:
manifests/plugin/ping.pp

Overview

Parameters:

  • hosts (Any)
  • ensure (Any) (defaults to: 'present')
  • manage_package (Any) (defaults to: undef)
  • interval (Any) (defaults to: undef)
  • timeout (Any) (defaults to: undef)
  • ttl (Any) (defaults to: undef)
  • source_address (Any) (defaults to: undef)
  • device (Any) (defaults to: undef)
  • max_missed (Any) (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/ping.pp', line 2

class collectd::plugin::ping (
  $hosts,
  $ensure         = 'present',
  $manage_package = undef,
  $interval       = undef,
  $timeout        = undef,
  $ttl            = undef,
  $source_address = undef,
  $device         = undef,
  $max_missed     = undef,
) {

  include ::collectd

  $_manage_package = pick($manage_package, $::collectd::manage_package)

  validate_array($hosts)

  if $::osfamily == 'Redhat' {
    if $_manage_package {
      package { 'collectd-ping':
        ensure => $ensure,
      }
    }
  }

  collectd::plugin { 'ping':
    ensure   => $ensure,
    interval => $interval,
    content  => template('collectd/plugin/ping.conf.erb'),
  }
}