Puppet Class: profile::hadoop::monitoring::resourcemanager

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

Overview

Class: profile::hadoop::monitoring::resourcemanager

Sets up Prometheus based monitoring for the Hadoop Yarn Resourcemanager. 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:

  • prometheus_nodes (Any) (defaults to: hiera('prometheus_nodes'))
  • hadoop_cluster_name (Any) (defaults to: hiera('profile::hadoop::common::hadoop_cluster_name'))


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

class profile::hadoop::monitoring::resourcemanager(
    $prometheus_nodes        = hiera('prometheus_nodes'),
    $hadoop_cluster_name     = hiera('profile::hadoop::common::hadoop_cluster_name'),
) {
    $jmx_exporter_config_file = '/etc/prometheus/yarn_resourcemanager_jmx_exporter.yaml'
    $prometheus_jmx_exporter_resourcemanager_port = 10083
    profile::prometheus::jmx_exporter { "hdfs_datanode_${::hostname}":
        hostname         => $::hostname,
        # Label these metrics with the hadoop cluster name.
        labels           => { 'hadoop_cluster' => $hadoop_cluster_name },
        port             => $prometheus_jmx_exporter_resourcemanager_port,
        prometheus_nodes => $prometheus_nodes,
        config_file      => $jmx_exporter_config_file,
        config_dir       => '/etc/prometheus',
        source           => 'puppet:///modules/profile/hadoop/prometheus_yarn_resourcemanager_jmx_exporter.yaml',
    }
}