Puppet Class: profile::puppetdb::monitoring_agentrun

Defined in:
modules/profile/manifests/puppetdb/monitoring_agentrun.pp

Overview

Parameters:

  • warn (Integer[1,99]) (defaults to: lookup('profile::puppetdb::monitoring_agentrun::warn'))
  • crit (Integer[1,99]) (defaults to: lookup('profile::puppetdb::monitoring_agentrun::crit'))


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/profile/manifests/puppetdb/monitoring_agentrun.pp', line 3

class profile::puppetdb::monitoring_agentrun (
    Integer[1,99] $warn = lookup('profile::puppetdb::monitoring_agentrun::warn'),
    Integer[1,99] $crit = lookup('profile::puppetdb::monitoring_agentrun::crit'),
) {

    ensure_packages(['python3-pypuppetdb'])

    file { '/usr/lib/nagios/plugins/check_puppet_run_changes':
        mode    => '0555',
        content => file('profile/puppetdb/check_puppet_run_changes.py'),
        require => Package['python3-pypuppetdb'],
    }

    nrpe::monitor_service{'puppet_run_changes':
        description    => 'Ensure hosts are not performing a change on every puppet run',
        nrpe_command   => "/usr/lib/nagios/plugins/check_puppet_run_changes -w ${warn} -c ${crit}",
        check_interval => 360,
        retry_interval => 5,
        retries        => 2,
        notes_url      => 'https://wikitech.wikimedia.org/wiki/Puppet#check_puppet_run_changes',
        require        => File['/usr/lib/nagios/plugins/check_puppet_run_changes'],
    }
}