10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'modules/prometheus/manifests/pint.pp', line 10
class prometheus::pint (
Wmflib::Ensure $ensure = present,
Stdlib::Port $listen_port = 9123,
Array[Stdlib::Unixpath] $watch_paths = ['/srv/alerts', '/srv/alerts-thanos'],
) {
ensure_packages('pint')
require prometheus::assemble_config
file { '/etc/prometheus/pint.hcl.d':
ensure => directory,
mode => '0555',
owner => 'root',
group => 'root',
recurse => true,
purge => true,
}
exec { 'assemble pint.hcl':
onlyif => 'prometheus-assemble-config --onlyif pint',
command => 'prometheus-assemble-config pint',
notify => Service['pint'],
path => '/usr/local/bin',
}
systemd::service { 'pint':
ensure => $ensure,
content => init_template('pint', 'systemd_override'),
override => true,
restart => true,
}
profile::auto_restarts::service { 'pint':
ensure => $ensure,
}
}
|