Puppet Class: profile::zookeeper::monitoring::server

Defined in:
modules/profile/manifests/zookeeper/monitoring/server.pp

Overview

SPDX-License-Identifier: Apache-2.0 Class: profile::zookeeper::monitoring::server

Sets up Prometheus based monitoring (only jvm) for the zookeeperd server.

Parameters:

  • cluster_name (String) (defaults to: lookup('profile::zookeeper::cluster_name'))


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/profile/manifests/zookeeper/monitoring/server.pp', line 6

class profile::zookeeper::monitoring::server(
    String $cluster_name = lookup('profile::zookeeper::cluster_name'),
){

    $jmx_exporter_config_file = '/etc/prometheus/jvm_zookeeper_jmx_exporter.yaml'
    $prometheus_jmx_exporter_zookeeper_server_port = 12181
    $java_opts = "-javaagent:/usr/share/java/prometheus/jmx_prometheus_javaagent.jar=${::ipaddress}:${prometheus_jmx_exporter_zookeeper_server_port}:${jmx_exporter_config_file}"
    profile::prometheus::jmx_exporter { "zookeeper_server_${::hostname}":
        hostname    => $::hostname,
        port        => $prometheus_jmx_exporter_zookeeper_server_port,
        config_file => $jmx_exporter_config_file,
        config_dir  => '/etc/prometheus',
        source      => 'puppet:///modules/profile/zookeeper/jvm_prometheus_jmx_exporter.yaml',
        labels      => {
            'zookeeper_cluster' => $cluster_name,
        },
    }
}