Puppet Class: profile::mariadb::monitor::prometheus

Defined in:
modules/profile/manifests/mariadb/monitor/prometheus.pp

Overview

Parameters:

  • socket (Any) (defaults to: '/run/mysqld/mysqld.sock')
  • 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
# File 'modules/profile/manifests/mariadb/monitor/prometheus.pp', line 1

class profile::mariadb::monitor::prometheus(
    $socket = '/run/mysqld/mysqld.sock',
    Array[Stdlib::Host] $prometheus_nodes = lookup('prometheus_nodes'),
){

    include passwords::prometheus

    prometheus::mysqld_exporter { 'default':
        client_password => $passwords::prometheus::db_pass,
        client_socket   => $socket,
    }

    $prometheus_ferm_nodes = join($prometheus_nodes, ' ')

    ferm::service { 'prometheus-mysqld-exporter':
        proto  => 'tcp',
        port   => '9104',
        srange => "@resolve((${prometheus_ferm_nodes}))",
    }
}