6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'modules/prometheus/manifests/node_varnishd_mmap_count.pp', line 6
class prometheus::node_varnishd_mmap_count (
Wmflib::Ensure $ensure = 'present',
Pattern[/\.prom$/] $outfile = '/var/lib/prometheus/node.d/varnishd_mmap_count.prom',
Systemd::Service::Name $service = 'varnish.service',
) {
file { '/usr/local/bin/prometheus-varnishd_mmap_count':
ensure => file,
mode => '0555',
owner => 'root',
group => 'root',
source => 'puppet:///modules/prometheus/usr/local/bin/prometheus-varnishd_mmap_count',
}
# Collect every minute
systemd::timer::job { 'prometheus_varnishd_mmap_count':
ensure => $ensure,
description => 'Regular job to collect number of varnishd memory map areas',
user => 'root',
command => "/usr/local/bin/prometheus-varnishd_mmap_count ${service} ${outfile}",
interval => {'start' => 'OnCalendar', 'interval' => 'minutely'},
}
}
|