Puppet Class: profile::opensearch::logstash

Defined in:
modules/profile/manifests/opensearch/logstash.pp

Overview

vim:sw=4 ts=4 sts=4 et:

Class: profile::opensearch::logstash

Provisions OpenSearch backend node for a Logstash cluster.

Parameters:

  • jobs_host (Optional[Stdlib::Fqdn]) (defaults to: lookup('profile::opensearch::logstash::jobs_host', { default_value => undef }))
  • curator_actions (Optional[Hash]) (defaults to: lookup('profile::opensearch::logstash::curator_actions', { default_value => undef }))
  • dc_settings (Opensearch::InstanceParams) (defaults to: lookup('profile::opensearch::dc_settings'))


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'modules/profile/manifests/opensearch/logstash.pp', line 6

class profile::opensearch::logstash(
    Optional[Stdlib::Fqdn]     $jobs_host        = lookup('profile::opensearch::logstash::jobs_host',       { default_value => undef }),
    Optional[Hash]             $curator_actions  = lookup('profile::opensearch::logstash::curator_actions', { default_value => undef }),
    Opensearch::InstanceParams $dc_settings      = lookup('profile::opensearch::dc_settings'),
) {
    include ::profile::opensearch::server

    # tasks that should only run on one host
    # TODO: use fork when available
    if $jobs_host == $::fqdn {
        include ::profile::prometheus::es_exporter

        if ($curator_actions) {
            # all curator actions from hiera: profile::opensearch::logstash::curator_actions
            opensearch::curator::job { 'cluster_wide':
                cluster_name => $dc_settings['cluster_name'],
                actions      => $curator_actions,
            }
        }
    }
}