Puppet Class: profile::wmcs::metricsinfra::alertmanager::karma

Defined in:
modules/profile/manifests/wmcs/metricsinfra/alertmanager/karma.pp

Overview

Set up metricsinfra-specific configuration for the karma Dashboard

Parameters:

  • vhost (String) (defaults to: lookup('profile::wmcs::metricsinfra::alertmanager::karma::vhost', {'default_value' => 'prometheus-alerts.wmcloud.org'}))
  • prometheus_alertmanager_hosts (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::wmcs::metricsinfra::prometheus_alertmanager_hosts'))


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
# File 'modules/profile/manifests/wmcs/metricsinfra/alertmanager/karma.pp', line 2

class profile::wmcs::metricsinfra::alertmanager::karma (
    String              $vhost                         = lookup('profile::wmcs::metricsinfra::alertmanager::karma::vhost', {'default_value' => 'prometheus-alerts.wmcloud.org'}),
    Array[Stdlib::Fqdn] $prometheus_alertmanager_hosts = lookup('profile::wmcs::metricsinfra::prometheus_alertmanager_hosts'),
) {
    class { 'httpd':
        modules => [
            'proxy',
            'proxy_http',
            'rewrite',
            'headers',
            'allowmethods',
        ],
    }

    class { 'alertmanager::karma':
        vhost          => $vhost,
        config         => template('profile/wmcs/metricsinfra/alertmanager/karma.yml.erb'),
        listen_address => '0.0.0.0',
        listen_port    => 19194,
        auth_header    => 'X-CAS-uid',
    }

    profile::idp::client::httpd::site { $vhost:
        document_root    => '/var/www/html',
        vhost_content    => 'profile/idp/client/httpd-karma-cloud.erb',
        proxied_as_https => true,
    }

    file { '/etc/karma-acl-silences.yaml':
        content => template('profile/wmcs/metricsinfra/alertmanager/karma-acls.yml.erb'),
        require => Package['karma'],
        notify  => Service['karma'],
    }
}