Defined Type: profile::mjolnir::kafka_msearch_daemon_instance

Defined in:
modules/profile/manifests/mjolnir/kafka_msearch_daemon_instance.pp

Overview

Parameters:

  • ensure (Any)
  • prometheus_port (Any)
  • prometheus_nodes_ferm (Any)


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

define profile::mjolnir::kafka_msearch_daemon_instance(
  $ensure,
  $prometheus_port,
  $prometheus_nodes_ferm
) {
    $service_name = "mjolnir-kafka-msearch-daemon@${title}"

    ferm::service { "mjolnir-msearch-metrics_${title}":
      ensure => $ensure,
      proto  => 'tcp',
      port   => $prometheus_port,
      srange => "(@resolve((${prometheus_nodes_ferm})) @resolve((${prometheus_nodes_ferm}), AAAA))",
    }

    service { $service_name:
      ensure   => 'present' == $ensure,
      provider => 'systemd',
      enable   => 'present' == $ensure,
      require  => Systemd::Unit['mjolnir-kafka-msearch-daemon@.service'],
    }

    ::base::service_auto_restart { $service_name:
        ensure => $ensure,
    }
}