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
|
# File 'modules/prometheus/manifests/node_phpfpm_statustext.pp', line 16
class prometheus::node_phpfpm_statustext (
Wmflib::Ensure $ensure = 'present',
Pattern[/\.prom$/] $outfile = '/var/lib/prometheus/node.d/phpfpm-statustext.prom',
Array[Wmflib::Php_version] $php_versions = ['7.2'],
) {
$exec = '/usr/local/bin/prometheus-phpfpm-statustext'
file { $exec:
ensure => file,
mode => '0555',
owner => 'root',
group => 'root',
source => 'puppet:///modules/prometheus/usr/local/bin/prometheus-phpfpm-statustext.sh',
}
# Collect every minute
systemd::timer::job { 'prometheus-phpfpm-statustext-textfile':
ensure => $ensure,
description => 'Update PHP-FPM worker count stats exported by node_exporter',
command => "${exec} ${outfile} ${php_versions.join(' ')}",
user => 'root',
logging_enabled => false,
require => [File[$exec]],
interval => {
'start' => 'OnUnitInactiveSec',
'interval' => '60s',
},
}
}
|