Defined Type: prometheus::resource_config

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

Overview

Parameters:

  • dest (String)
  • define_name (String)
  • port_parameter (String)
  • prometheus_site (String) (defaults to: $::site)
  • labels (Hash) (defaults to: {})


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'modules/prometheus/manifests/resource_config.pp', line 32

define prometheus::resource_config(
    String $dest,
    String $define_name,
    String $port_parameter,
    String $prometheus_site = $::site,
    Hash   $labels          = {},
) {
    $query = "${define_name}[~'.*']"
    $resources = query_resources(false, $query, true)
    $site_clusters = get_clusters({'site' => $prometheus_site})

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