Puppet Class: nutcracker::monitoring

Defined in:
modules/nutcracker/manifests/monitoring.pp

Overview

Class: nutcracker::monitoring

Provisions Icinga alerts for nutcracker.

Parameters:

  • port (Stdlib::Port) (defaults to: 11212)
  • socket (Optional[Stdlib::Unixpath]) (defaults to: undef)


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
# File 'modules/nutcracker/manifests/monitoring.pp', line 5

class nutcracker::monitoring(
    Stdlib::Port $port = 11212,
    Optional[Stdlib::Unixpath] $socket = undef,
) {
    nrpe::monitor_service { 'nutcracker':
        description  => 'nutcracker process',
        nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -u nutcracker -C nutcracker',
        notes_url    => 'https://wikitech.wikimedia.org/wiki/Nutcracker',
    }

    if ($port != 0) {
        nrpe::monitor_service { 'nutcracker_port':
            description  => 'nutcracker port',
            nrpe_command => "/usr/lib/nagios/plugins/check_tcp -H 127.0.0.1 -p ${port} --timeout=2",
            notes_url    => 'https://wikitech.wikimedia.org/wiki/Nutcracker',
        }
    }
    if ($socket != undef) {
        nrpe::monitor_service { 'nutcracker_socket':
            description  => 'nutcracker socket',
            nrpe_command => "/usr/lib/nagios/plugins/check_tcp -H ${socket} --timeout=2",
            notes_url    => 'https://wikitech.wikimedia.org/wiki/Nutcracker',
        }
    }
}