Puppet Class: profile::wmcs::graphite

Defined in:
modules/profile/manifests/wmcs/graphite.pp

Overview

Parameters:

  • graphite_host (Stdlib::Fqdn) (defaults to: lookup('graphite_host', {'default_value' => 'localhost'}))


1
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'modules/profile/manifests/wmcs/graphite.pp', line 1

class profile::wmcs::graphite (
    Stdlib::Fqdn $graphite_host = lookup('graphite_host', {'default_value' => 'localhost'}),
) {

    include graphite::wmcs::archiver

    class { '::uwsgi': }

    class { '::httpd':
        modules => ['proxy', 'proxy_http', 'rewrite', 'uwsgi',
                    'headers', 'authnz_ldap', 'ldap'],
    }

    class { 'profile::graphite::base':
        storage_dir  => '/srv/carbon',
        auth         => false,
        hostname     => 'graphite-labs.wikimedia.org',
        cors_origins => [ 'https?://grafana-labs.wikimedia.org' ],
    }

    file { '/var/lib/carbon':
        ensure  => link,
        target  => '/srv/carbon',
        owner   => '_graphite',
        group   => '_graphite',
        require => Class['profile::graphite::base']
    }

    ferm::service { 'carbon_c_relay-local_relay_udp':
        proto  => 'udp',
        port   => '1903',
        srange => "@resolve(${graphite_host})",
    }

    ferm::service { 'carbon_c_relay-local_relay_tcp':
        proto  => 'tcp',
        port   => '1903',
        srange => "@resolve(${graphite_host})",
    }

    ferm::service { 'statsite_udp':
        proto  => 'udp',
        port   => '8125',
        srange => '$LABS_NETWORKS',
    }

    ferm::service { 'statsite_tcp':
        proto  => 'udp',
        port   => '8125',
        srange => '$LABS_NETWORKS',
    }

    ferm::service { 'carbon_c_relay-frontend_relay_udp':
        proto  => 'udp',
        port   => '2003',
        srange => '$LABS_NETWORKS',
    }

    ferm::service { 'carbon_c_relay-frontend_relay_tcp':
        proto  => 'tcp',
        port   => '2003',
        srange => '$LABS_NETWORKS',
    }

    ferm::service { 'carbon_pickled':
        proto  => 'tcp',
        port   => '2004',
        srange => '$LABS_NETWORKS',
    }
}