Puppet Class: role::prometheus::mysqld_exporter

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

Overview

Parameters:

  • socket (Any) (defaults to: '/tmp/mysql.sock')


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

class role::prometheus::mysqld_exporter (
    $socket ='/tmp/mysql.sock',
    ) {

    include passwords::prometheus

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

    $prometheus_nodes = hiera('prometheus_nodes')
    $prometheus_ferm_nodes = join($prometheus_nodes, ' ')

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