Puppet Class: nagios::check::zookeeper

Defined in:
manifests/check/zookeeper.pp

Overview

Parameters:

  • args (Any) (defaults to: undef)
  • check_period (Any) (defaults to: undef)
  • first_notification_delay (Any) (defaults to: undef)
  • notification_period (Any) (defaults to: undef)
  • keys_enabled (Any) (defaults to: [])
  • keys_disabled (Any) (defaults to: [])
  • pkg (Any) (defaults to: true)
  • ensure (Any) (defaults to: undef)
  • leader (Any) (defaults to: false)
  • plugin (Any) (defaults to: 'check_zookeeper')
  • args_zk_avg_latency (Any) (defaults to: '-w 1 -c 10')
  • args_zk_max_latency (Any) (defaults to: '-w 10 -c 20')
  • args_zk_outstanding_requests (Any) (defaults to: '-w 10 -c 20')
  • args_zk_open_file_descriptor_count (Any) (defaults to: '-w 3481 -c 3890')
  • args_zk_pending_syncs (Any) (defaults to: '-w 10 -c 20')
  • args_zk_followers (Any) (defaults to: '-w 3 -c 3')


1
2
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
# File 'manifests/check/zookeeper.pp', line 1

class nagios::check::zookeeper (
  $args                               = undef,
  $check_period                       = undef,
  $first_notification_delay           = undef,
  $notification_period                = undef,
  $keys_enabled                       = [],
  $keys_disabled                      = [],
  $pkg                                = true,
  $ensure                             = undef,
  $leader                             = false,
  $plugin                             = 'check_zookeeper',
  # Keys
  $args_zk_avg_latency                = '-w 1 -c 10',
  $args_zk_max_latency                = '-w 10 -c 20',
  $args_zk_outstanding_requests       = '-w 10 -c 20',
  $args_zk_open_file_descriptor_count = '-w 3481 -c 3890',
  # Leader only keys
  $args_zk_pending_syncs              = '-w 10 -c 20',
  $args_zk_followers                  = '-w 3 -c 3',
) {

  # Generic overrides
  if $check_period {
    Nagios_service { check_period => $::nagios_check_zookeeper_period }
  }
  if $first_notification_delay {
    Nagios_service { first_notification_delay => $::nagios_check_zookeeper_first_notification_delay }
  }
  if $notification_period {
    Nagios_service { notification_period => $::nagios_check_zookeeper_notification_period }
  }

  # Optional package containing the script
  if $pkg {
    $pkgname = 'nagios-plugins-zookeeper'
    $pkgensure = $ensure ? {
      'absent' => 'absent',
      default  => 'installed',
    }
    package { $pkgname: ensure => $pkgensure }
  }

  # Modes-specific definition
  nagios::check::zookeeper::key { [
    'zk_avg_latency',
    'zk_max_latency',
    'zk_outstanding_requests',
    'zk_open_file_descriptor_count',
    'zk_pending_syncs',
    'zk_followers',
  ]:
  }

}