Puppet Class: smokeping

Defined in:
modules/smokeping/manifests/init.pp

Overview

SmokePing - monitor network latency oss.oetiker.ch/smokeping github.com/oetiker/SmokePing

parameters: $active_server In a multi-server setup, set $active_server to the FQDN of the server that should run the smokeping service and be the rsync source of RRD files.

Parameters:

  • active_server (Stdlib::Fqdn)


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
34
35
36
37
38
39
# File 'modules/smokeping/manifests/init.pp', line 9

class smokeping(
    Stdlib::Fqdn $active_server,
) {

    require_package('smokeping', 'curl', 'dnsutils')

    file { '/etc/smokeping/config.d':
        ensure  => directory,
        recurse => true,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        source  => 'puppet:///modules/smokeping/config.d',
        require => Package['smokeping'],
    }

    if $active_server == $::fqdn {
        $service_ensure = 'running'
    } else {
        $service_ensure = 'stopped'
    }

    service { 'smokeping':
        ensure    => $service_ensure,
        require   => [
            Package['smokeping'],
            File['/etc/smokeping/config.d'],
        ],
        subscribe => File['/etc/smokeping/config.d'],
    }
}