Defined Type: prometheus::memcached_exporter

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

Overview

Parameters:

  • arguments (Any) (defaults to: '')


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/memcached_exporter.pp', line 10

define prometheus::memcached_exporter (
    $arguments = '',
) {
    require_package('prometheus-memcached-exporter')

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

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

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