Puppet Class: mariadb::monitor_memory

Defined in:
modules/mariadb/manifests/monitor_memory.pp

Overview

Parameters:

  • critical (Integer[0, 100]) (defaults to: 95)
  • warning (Integer[0, 100]) (defaults to: 90)
  • is_critical (Boolean) (defaults to: false)
  • contact_group (String) (defaults to: 'admins')


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'modules/mariadb/manifests/monitor_memory.pp', line 7

class mariadb::monitor_memory(
    Integer[0, 100] $critical = 95,
    Integer[0, 100] $warning  = 90,
    Boolean $is_critical      = false,
    String $contact_group     = 'admins',
) {
    ensure_packages ('monitoring-plugins-contrib')  # for pmp-check-unix-memory

    $path = '/usr/lib/nagios/plugins'
    $check_command = "${path}/pmp-check-unix-memory -c ${critical} -w ${warning}"

    nrpe::monitor_service { 'mariadb_memory':
        description   => 'MariaDB memory',
        nrpe_command  => $check_command,
        critical      => $is_critical,
        contact_group => $contact_group,
        require       => Package['monitoring-plugins-contrib'],
        notes_url     => 'https://wikitech.wikimedia.org/wiki/MariaDB/troubleshooting',
    }
}