Puppet Class: profile::wmcs::metricsinfra::haproxy

Defined in:
modules/profile/manifests/wmcs/metricsinfra/haproxy.pp

Overview

Parameters:

  • prometheus_hosts (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::wmcs::metricsinfra::prometheus_hosts'))
  • prometheus_alertmanager_hosts (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::wmcs::metricsinfra::prometheus_alertmanager_hosts'))
  • alertmanager_active_host (Stdlib::Fqdn) (defaults to: lookup('profile::wmcs::metricsinfra::alertmanager_active_host'))
  • config_manager_hosts (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::wmcs::metricsinfra::config_manager_hosts'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'modules/profile/manifests/wmcs/metricsinfra/haproxy.pp', line 1

class profile::wmcs::metricsinfra::haproxy (
    Array[Stdlib::Fqdn] $prometheus_hosts = lookup('profile::wmcs::metricsinfra::prometheus_hosts'),
    Array[Stdlib::Fqdn] $prometheus_alertmanager_hosts = lookup('profile::wmcs::metricsinfra::prometheus_alertmanager_hosts'),
    Stdlib::Fqdn        $alertmanager_active_host = lookup('profile::wmcs::metricsinfra::alertmanager_active_host'),
    Array[Stdlib::Fqdn] $config_manager_hosts = lookup('profile::wmcs::metricsinfra::config_manager_hosts'),
) {
    class { 'haproxy::cloud::base': }

    file { '/etc/haproxy/conf.d/prometheus.cfg':
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => template('profile/wmcs/metricsinfra/haproxy/prometheus.cfg.erb'),
        notify  => Service['haproxy'],
    }

    class { '::prometheus::haproxy_exporter':
        listen_port => 9901,
    }
}