Puppet Class: profile::alertmanager::ack

Defined in:
modules/profile/manifests/alertmanager/ack.pp

Overview

Parameters:

  • active_host (Stdlib::Host) (defaults to: lookup('profile::alertmanager::active_host'))
  • prometheus_nodes (Array[Stdlib::Host]) (defaults to: lookup('prometheus_nodes'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'modules/profile/manifests/alertmanager/ack.pp', line 1

class profile::alertmanager::ack (
    Stdlib::Host        $active_host = lookup('profile::alertmanager::active_host'),
    Array[Stdlib::Host] $prometheus_nodes = lookup('prometheus_nodes'),
) {
    if $active_host == $::fqdn {
        $ensure = present
    } else {
        $ensure = absent
    }

    $http_port = 19195

    class { 'alertmanager::ack':
        ensure      => $ensure,
        listen_port => $http_port,
    }

    $hosts = join($prometheus_nodes, ' ')
    ferm::service { 'alertmanager-ack':
        proto  => 'tcp',
        port   => $http_port,
        srange => "@resolve((${hosts}))",
    }
}