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)


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

define prometheus::wmf_elasticsearch_exporter(
    Stdlib::Port $prometheus_port,
    Stdlib::Port $elasticsearch_port,
) {
    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'],
    }

    base::service_auto_restart { $service_name: }
}