Puppet Class: psick::monitor::nrpe

Defined in:
manifests/monitor/nrpe.pp

Overview

Class: site::monitor::nrpe

Parameters:

  • ensure (Any) (defaults to: 'present')
  • config_dir_source (Any) (defaults to: undef)
  • config_file_template (Any) (defaults to: undef)
  • extra_config_file_template (Any) (defaults to: undef)


3
4
5
6
7
8
9
10
11
12
13
14
15
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'manifests/monitor/nrpe.pp', line 3

class psick::monitor::nrpe (
  $ensure                     = 'present',

  $config_dir_source          = undef,
  $config_file_template       = undef,
  $extra_config_file_template = undef,
) {

  $options_default = {
    nrpe_timeout               => '10',
    disk_warning               => '20%',
    disk_critical              => '10%',
    swap_warning               => '40%',
    swap_critical              => '20%',
    users_warning              => '10',
    users_critical             => '15',
    load_warning               => '15,10,5',
    load_critical              => '30,25,20',
    procs_warning              => '300',
    procs_critical             => '600',
    zombie_procs_warning       => '5',
    zombie_procs_critical      => '10',
    ntp_server                 => '0.pool.ntp.org',
    ntp_warning                => '1',
    ntp_critical               => '3',
    nginx_status_port          => '26000',
    backup_inc_warning         => '28',
    backup_inc_critical        => '52',
    backup_full_warning        => '40',
    backup_full_critical       => '60',
    backup_psick             => 'hetzner',
    puppetrun_warning          => '86400',
    puppetrun_critical         => '172800',
    memory_warning             => '10',
    memory_critical            => '5',
  }
  #
  $options_user=hiera_hash('nrpe_options', {} )
  $options=merge($options_default,$options_user)

  ::tp::install { 'nrpe':
    ensure => $ensure,
  }

  ::tp::dir { 'nrpe':
    ensure => $ensure,
    source => $config_dir_source,
  }
  ::tp::conf { 'nrpe':
    ensure       => $ensure,
    template     => $config_file_template,
    options_hash => $options,
  }

  ::tp::conf { 'nrpe::extra.conf':
    ensure       => $ensure,
    template     => $extra_config_file_template,
    options_hash => $options,
  }

}