Defined Type: prometheus::varnish_exporter

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

Overview

Parameters:

  • instance (Any) (defaults to: $::hostname)
  • listen_address (Any) (defaults to: ':9131')


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

define prometheus::varnish_exporter (
    $instance  = $::hostname,
    $listen_address = ':9131',
) {
    require_package('prometheus-varnish-exporter')

    exec { "mask_default_varnish_exporter_${title}":
        command => '/bin/systemctl mask prometheus-varnish-exporter.service',
        creates => '/etc/systemd/system/prometheus-varnish-exporter.service',
    }

    systemd::service { "prometheus-varnish-exporter@${instance}":
        ensure  => present,
        restart => true,
        content => systemd_template('prometheus-varnish-exporter@'),
        require => Package['prometheus-varnish-exporter'],
    }
}