Puppet Class: profile::elasticsearch::monitor::base_checks

Defined in:
modules/profile/manifests/elasticsearch/monitor/base_checks.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • shard_size_warning (Integer) (defaults to: lookup('profile::elasticsearch::monitor::shard_size_warning', {'default_value' => 110}))
  • shard_size_critical (Integer) (defaults to: lookup('profile::elasticsearch::monitor::shard_size_critical', {'default_value' => 140}))
  • threshold (String) (defaults to: lookup('profile::elasticsearch::monitor::threshold', {'default_value' => '>=0.15'}))
  • timeout (Integer) (defaults to: lookup('profile::elasticsearch::monitor::timeout', {'default_value' => 4}))


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

class profile::elasticsearch::monitor::base_checks(
    Integer $shard_size_warning = lookup('profile::elasticsearch::monitor::shard_size_warning', {'default_value' => 110}),
    Integer $shard_size_critical = lookup('profile::elasticsearch::monitor::shard_size_critical', {'default_value' => 140}),
    String $threshold = lookup('profile::elasticsearch::monitor::threshold', {'default_value' => '>=0.15'}),
    Integer $timeout = lookup('profile::elasticsearch::monitor::timeout', {'default_value' => 4}),
) {
    require ::profile::elasticsearch

    $configured_ports = $::profile::elasticsearch::filtered_instances.reduce([]) |$ports, $instance_params| {
        $ports + [$instance_params[1]['http_port']]
    }

    # For monitoring of eqiad/codfw cirrus clusters, see icinga::monitor::elasticsearch::cirrus_cluster_checks
    icinga::monitor::elasticsearch::base_checks { $::hostname:
        ports               => $configured_ports,
        shard_size_warning  => $shard_size_warning,
        shard_size_critical => $shard_size_critical,
        timeout             => $timeout,
        threshold           => $threshold,
        use_nrpe            => true,
    }
}