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

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

Overview

Parameters:

  • shard_size_warning (Integer) (defaults to: hiera('profile::elasticsearch::monitor::shard_size_warning', 50))
  • shard_size_critical (Integer) (defaults to: hiera('profile::elasticsearch::monitor::shard_size_critical', 60))
  • threshold (String) (defaults to: hiera('profile::elasticsearch::monitor::threshold', '>=0.15'))
  • timeout (Integer) (defaults to: hiera('profile::elasticsearch::monitor::timeout', 4))


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

class profile::elasticsearch::monitor::base_checks(
    Integer $shard_size_warning = hiera('profile::elasticsearch::monitor::shard_size_warning', 50),
    Integer $shard_size_critical = hiera('profile::elasticsearch::monitor::shard_size_critical', 60),
    String $threshold = hiera('profile::elasticsearch::monitor::threshold', '>=0.15'),
    Integer $timeout = hiera('profile::elasticsearch::monitor::timeout', 4),
) {
    require ::profile::elasticsearch

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

    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,
    }
}