This repository has been archived on 2025-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
Files
puppet/manifests/monitored/client.pp
2014-05-26 13:03:17 +02:00

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,
}
}