Defined Type: prometheus::wmf_elasticsearch_exporter

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

Overview

Parameters:

  • prometheus_port (Stdlib::Port)
  • elasticsearch_port (Stdlib::Port)
  • indices_to_monitor (Array[String])


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'modules/prometheus/manifests/wmf_elasticsearch_exporter.pp', line 3

define prometheus::wmf_elasticsearch_exporter(
    Stdlib::Port $prometheus_port,
    Stdlib::Port $elasticsearch_port,
    Array[String] $indices_to_monitor,
) {
    include ::prometheus::wmf_elasticsearch_exporter::common

    $service_name = "prometheus-wmf-elasticsearch-exporter-${elasticsearch_port}"
    systemd::service { $service_name:
        ensure    => present,
        restart   => true,
        content   => systemd_template('prometheus-wmf-elasticsearch-exporter'),
        require   => File['/usr/local/bin/prometheus-wmf-elasticsearch-exporter'],
        subscribe => File['/usr/local/bin/prometheus-wmf-elasticsearch-exporter'],
    }

    profile::auto_restarts::service { $service_name: }
}