Puppet Class: profile::prometheus::pdns_exporter

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

Overview

Parameters:

  • prometheus_nodes (Array[Stdlib::Fqdn]) (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
# File 'modules/profile/manifests/prometheus/pdns_exporter.pp', line 1

class profile::prometheus::pdns_exporter (
    Array[Stdlib::Fqdn] $prometheus_nodes = lookup('prometheus_nodes'),
) {
    require_package('prometheus-pdns-exporter')

    service { 'prometheus-pdns-exporter':
        ensure  => running,
    }

    $prometheus_ferm_nodes = join($prometheus_nodes, ' ')
    $ferm_srange = "(@resolve((${prometheus_ferm_nodes})) @resolve((${prometheus_ferm_nodes}), AAAA))"

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

    base::service_auto_restart { 'prometheus-pdns-exporter': }
}