Defined Type: elasticsearch::log::hot_threads_cluster

Defined in:
modules/elasticsearch/manifests/log/hot_threads_cluster.pp

Overview

Define: elasticsearch::log::hot_threads_cluster

Configure an elasticsearch instance to collect hot threads logs.

Parameters:

  • http_port (Stdlib::Port)
  • cluster_name (String) (defaults to: $title)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'modules/elasticsearch/manifests/log/hot_threads_cluster.pp', line 5

define elasticsearch::log::hot_threads_cluster(
    Stdlib::Port $http_port,
    String $cluster_name = $title,
){
    include ::elasticsearch::log::hot_threads

    file { "/etc/elasticsearch_hot_threads.d/${cluster_name}.yml":
        ensure  => file,
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
        content => ordered_yaml({
            port     => $http_port,
            log_file => "/var/log/elasticsearch/elasticsearch_hot_threads-${cluster_name}.log",
        }),
    }
}