Puppet Class: profile::opensearch::monitoring::base_checks

Defined in:
modules/profile/manifests/opensearch/monitoring/base_checks.pp

Overview

Parameters:

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


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

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

    $configured_ports = $::profile::opensearch::server::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::opensearch::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,
    }
}