3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'modules/prometheus/manifests/es_exporter.pp', line 3
class prometheus::es_exporter {
package { 'prometheus-es-exporter':
ensure => present,
}
file { '/etc/prometheus-es-exporter':
ensure => directory,
recurse => true,
purge => true,
force => true,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/prometheus/es_exporter',
require => Package['prometheus-es-exporter'],
notify => Service['prometheus-es-exporter'],
}
# by default, prometheus-es-exporter exports cluster, index, and node metrics generated by prometheus-elasticsearch-exporter
# this unit override disables these metrics in prometheus-es-exporter
systemd::service { 'prometheus-es-exporter':
ensure => present,
content => init_template('prometheus-es-exporter', 'systemd_override'),
override => true,
restart => true,
}
profile::auto_restarts::service { 'prometheus-es-exporter': }
}
|