Puppet Class: profile::grafana::production

Defined in:
modules/profile/manifests/grafana/production.pp

Overview

Class: profile::grafana::production

Grafana is a dashboarding web application. It powers <grafana.wikimedia.org>.



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
# File 'modules/profile/manifests/grafana/production.pp', line 6

class profile::grafana::production {
    include ::profile::grafana

    rsync::quickdatacopy { 'var-lib-grafana':
      ensure              => present,
      source_host         => 'grafana1002.eqiad.wmnet',
      dest_host           => 'grafana2001.codfw.wmnet',
      module_path         => '/var/lib/grafana',
      server_uses_stunnel => true,
    }

    # On Grafana 5 and later, datasource configurations are stored in Puppet
    # as YAML and pushed to Grafana that way, which reads them at startup.
    file { '/etc/grafana/provisioning/datasources/production-datasources.yaml':
        ensure  => present,
        source  => 'puppet:///modules/profile/grafana/production-datasources.yaml',
        owner   => 'root',
        group   => 'grafana',
        mode    => '0440',
        require => Package['grafana'],
        notify  => Service['grafana-server'],
    }

    grafana::dashboard { 'varnish-http-errors':
        ensure  => absent,
        content => '',
    }

    grafana::dashboard { 'varnish-aggregate-client-status-codes':
        source => 'puppet:///modules/grafana/dashboards/varnish-aggregate-client-status-codes',
    }

    grafana::dashboard { 'swift':
        source => 'puppet:///modules/grafana/dashboards/swift',
    }
}