Puppet Class: profile::hadoop::monitoring::nodemanager

Defined in:
modules/profile/manifests/hadoop/monitoring/nodemanager.pp

Overview

SPDX-License-Identifier: Apache-2.0 Class: profile::hadoop::monitoring::nodemanager

Sets up Prometheus based monitoring for the Hadoop NodeManager. This profile takes care of installing the Prometheus exporter and setting up its configuration file, but it does not instruct the target JVM to use it.

Parameters:

  • hadoop_cluster_name (String) (defaults to: lookup('profile::hadoop::common::hadoop_cluster_name'))


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

class profile::hadoop::monitoring::nodemanager(
    String $hadoop_cluster_name = lookup('profile::hadoop::common::hadoop_cluster_name'),
){

    $jmx_exporter_config_file = '/etc/prometheus/yarn_nodemanager_jmx_exporter.yaml'
    $prometheus_jmx_exporter_nodemanager_port = 8141
    profile::prometheus::jmx_exporter { "yarn_nodemanager_${::hostname}":
        hostname    => $::hostname,
        port        => $prometheus_jmx_exporter_nodemanager_port,
        # Label these metrics with the hadoop cluster name.
        labels      => { 'hadoop_cluster' => $hadoop_cluster_name },
        config_file => $jmx_exporter_config_file,
        config_dir  => '/etc/prometheus',
        source      => 'puppet:///modules/profile/hadoop/prometheus_yarn_nodemanager_jmx_exporter.yaml',
    }
}