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/systemd/manifests/monitor.pp', line 8
define systemd::monitor (
Stdlib::HTTPUrl $notes_url,
Wmflib::Ensure $ensure = 'present',
Integer[1] $check_interval = 10,
Integer[1] $retries = 2,
String $contact_group = 'admin',
Boolean $critical = false,
) {
# T225268 - always provision NRPE plugin script
ensure_resource('nrpe::plugin', 'check_systemd_unit_status', {
source => 'puppet:///modules/systemd/check_systemd_unit_status',
})
nrpe::monitor_service { "check_${title}_status":
ensure => $ensure,
description => "Check unit status of ${title}",
nrpe_command => "/usr/local/lib/nagios/plugins/check_systemd_unit_status ${title}",
check_interval => $check_interval,
retries => $retries,
contact_group => $contact_group,
notes_url => $notes_url,
critical => $critical,
}
}
|