Puppet Class: prometheus::haproxy_exporter

Defined in:
modules/prometheus/manifests/haproxy_exporter.pp

Overview

Parameters:

  • endpoint (Stdlib::HTTPUrl) (defaults to: 'http://localhost:9100/?stats;csv')
  • listen_port (Stdlib::Port::User) (defaults to: 9901)


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'modules/prometheus/manifests/haproxy_exporter.pp', line 11

class prometheus::haproxy_exporter (
    Stdlib::HTTPUrl $endpoint  = 'http://localhost:9100/?stats;csv',
    Stdlib::Port::User $listen_port = 9901,
) {
    ensure_packages('prometheus-haproxy-exporter')

    $exec_binary = $::lsbdistcodename ? {
        buster  => '/usr/bin/prometheus-haproxy-exporter',
        stretch => '/usr/bin/haproxy_exporter',
    }

    systemd::service { 'prometheus-haproxy-exporter':
        ensure  => present,
        restart => true,
        content => systemd_template('prometheus-haproxy-exporter'),
    }

    profile::auto_restarts::service { 'prometheus-haproxy-exporter': }
}