Puppet Class: profile::prometheus::statsd_exporter

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

Overview

Parameters:

  • prometheus_nodes (Array[String]) (defaults to: hiera('prometheus_nodes'))
  • mappings (Array[Hash]) (defaults to: hiera('profile::prometheus::statsd_exporter::mappings'))
  • relay_address (String) (defaults to: hiera('statsd'))


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

class profile::prometheus::statsd_exporter (
    Array[String] $prometheus_nodes = hiera('prometheus_nodes'),
    Array[Hash] $mappings = hiera('profile::prometheus::statsd_exporter::mappings'),
    String $relay_address = hiera('statsd'),
) {
    class { '::prometheus::statsd_exporter':
        mappings      => $mappings,
        relay_address => $relay_address,
    }

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

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