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 (Wmflib::UserIpPort) (defaults to: 9901)


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

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

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

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

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