Defined Type: prometheus::apache_exporter

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

Overview

Parameters:

  • arguments (Any) (defaults to: '-scrape_uri http://127.0.0.1/server-status/?auto')


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

define prometheus::apache_exporter (
    $arguments = '-scrape_uri http://127.0.0.1/server-status/?auto',
) {
    require_package('prometheus-apache-exporter')

    file { '/etc/default/prometheus-apache-exporter':
        ensure  => present,
        mode    => '0444',
        owner   => 'root',
        group   => 'root',
        content => "ARGS=\"${arguments}\"",
        notify  => Service['prometheus-apache-exporter'],
    }

    service { 'prometheus-apache-exporter':
        ensure  => running,
        require => Package['prometheus-apache-exporter'],
    }

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