20 lines
700 B
Puppet
20 lines
700 B
Puppet
class puppet::monitored::client (
|
|
$ensure = 'present') {
|
|
$check = '/usr/lib/nagios/plugins/check_file_age -w10800 -c36000 -f/var/lib/puppet/state/last_run_summary.yaml'
|
|
|
|
icinga::object::hostgroupmember { 'puppet-clients': ensure => 'absent', }
|
|
|
|
sudo::conf { 'puppet-clients-icinga-sudo':
|
|
content => "nagios ALL=NOPASSWD: ${check}",
|
|
ensure => $ensure,
|
|
}
|
|
|
|
massive_passive::icinga::service { 'Puppet last run':
|
|
freshness_threshold => '5800',
|
|
command => "/usr/bin/sudo ${check}",
|
|
use => 'workhours-passive-service',
|
|
hostgroup_name => 'linux-servers',
|
|
notifications_enabled => 1,
|
|
ensure => $ensure,
|
|
}
|
|
} |