Puppet Class: profile::druid::coordinator

Defined in:
modules/profile/manifests/druid/coordinator.pp

Overview

Class: profile::druid::coordinator

NOTE that most Druid service profiles default ferm_srange to profile::druid::ferm_srange, but coordinator defaults to profile::druid::coordinato::ferm_srange, to haver finer control over how Druid accepts queries.

Parameters:

  • properties (Any) (defaults to: hiera('profile::druid::coordinator::properties', {}))
  • env (Any) (defaults to: hiera('profile::druid::coordinator::env', {}))
  • daemon_autoreload (Any) (defaults to: hiera('profile::druid::daemons_autoreload', true))
  • ferm_srange (Any) (defaults to: hiera('profile::druid::coordinator::ferm_srange', '$DOMAIN_NETWORKS'))
  • monitoring_enabled (Any) (defaults to: hiera('profile::druid::coordinator::monitoring_enabled', false))


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
55
56
57
# File 'modules/profile/manifests/druid/coordinator.pp', line 8

class profile::druid::coordinator(
    $properties         = hiera('profile::druid::coordinator::properties', {}),
    $env                = hiera('profile::druid::coordinator::env', {}),
    $daemon_autoreload  = hiera('profile::druid::daemons_autoreload', true),
    $ferm_srange        = hiera('profile::druid::coordinator::ferm_srange', '$DOMAIN_NETWORKS'),
    $monitoring_enabled = hiera('profile::druid::coordinator::monitoring_enabled', false),
) {

    require ::profile::druid::common

    # If monitoring is enabled, then include the monitoring profile and set $java_opts
    # for exposing the Prometheus JMX Exporter in the Druid Broker process.
    if $monitoring_enabled {
        require ::profile::druid::monitoring::coordinator
        $java_opts = $::profile::druid::monitoring::coordinator::java_opts

        if $env['DRUID_EXTRA_JVM_OPTS'] {
            $monitoring_env_vars = {
                'DRUID_EXTRA_JVM_OPTS' => "${env['DRUID_EXTRA_JVM_OPTS']} ${java_opts}"
            }
        } else {
            $monitoring_env_vars = {
                'DRUID_EXTRA_JVM_OPTS' => $java_opts
            }
        }
    } else {
        $monitoring_env_vars = {}
    }

    # Druid coordinator Service
    class { '::druid::coordinator':
        properties       => $properties,
        env              => merge($env, $monitoring_env_vars),
        should_subscribe => $daemon_autoreload,
    }

    ferm::service { 'druid-coordinator':
        proto  => 'tcp',
        port   => $::druid::coordinator::runtime_properties['druid.port'],
        srange => $ferm_srange,
    }

    if $monitoring_enabled {
        nrpe::monitor_service { 'druid-coordinator':
            description  => 'Druid coordinator',
            nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C java -a \'io.druid.cli.Main server coordinator\'',
            critical     => false,
        }
    }
}