Puppet Class: role::prometheus::node_exporter

Defined in:
modules/role/manifests/prometheus/node_exporter.pp

Overview



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'modules/role/manifests/prometheus/node_exporter.pp', line 8

class role::prometheus::node_exporter {
    include ::prometheus::node_exporter

    if $::realm == 'labs' {
        $ferm_srange = '$LABS_NETWORKS'
    } else {
        $prometheus_nodes = hiera('prometheus_nodes')
        $prometheus_ferm_nodes = join($prometheus_nodes, ' ')
        $ferm_srange = "(@resolve((${prometheus_ferm_nodes})) @resolve((${prometheus_ferm_nodes}), AAAA))"
    }

    ferm::service { 'prometheus-node-exporter':
        proto  => 'tcp',
        port   => '9100',
        srange => $ferm_srange,
    }
}