Puppet Class: profile::prometheus::haproxy_exporter

Defined in:
modules/profile/manifests/prometheus/haproxy_exporter.pp

Overview

Parameters:

  • prometheus_nodes (Any) (defaults to: hiera('prometheus_nodes'))
  • listen_port (Any) (defaults to: hiera('listen_port'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'modules/profile/manifests/prometheus/haproxy_exporter.pp', line 1

class profile::prometheus::haproxy_exporter(
    $prometheus_nodes = hiera('prometheus_nodes'),
    $listen_port = hiera('listen_port'),
) {
    $prometheus_nodes_ferm = join($prometheus_nodes, ' ')

    class {
        '::prometheus::haproxy_exporter':
            listen_port => $listen_port
    }

    ferm::service { 'haproxy_exporter':
        proto  => 'tcp',
        port   => $listen_port,
        srange => "(@resolve((${prometheus_nodes_ferm})) @resolve((${prometheus_nodes_ferm}), AAAA))",
    }
}