Defined Type: prometheus::class_config

Defined in:
modules/prometheus/manifests/class_config.pp

Overview

Parameters:

  • dest (String)
  • site (String)
  • class_name (String)
  • port (Stdlib::Port)
  • labels (Hash) (defaults to: {})
  • class_parameters (Hash) (defaults to: {})
  • hostnames_only (Boolean) (defaults to: true)


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'modules/prometheus/manifests/class_config.pp', line 27

define prometheus::class_config(
    String $dest,
    String $site,
    String $class_name,
    Stdlib::Port $port,
    Hash $labels = {},
    Hash $class_parameters = {},
    Boolean $hostnames_only = true,
) {
    $query = template('prometheus/puppetdb_query_string.erb')
    $servers = keys(query_resources(false, $query, true))
    $site_clusters = get_clusters({'site' => $site})

    file { $dest:
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => template('prometheus/class_config.erb'),
    }
}