Defined Type: prometheus::redis_exporter_config

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

Overview

Parameters:

  • dest (Any)
  • class_name (Any)
  • site (Any)
  • labels (Any) (defaults to: {})


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'modules/prometheus/manifests/redis_exporter_config.pp', line 13

define prometheus::redis_exporter_config(
    $dest,
    $class_name,
    $site,
    $labels = {},
) {
    validate_string($dest)
    validate_string($site)
    validate_hash($labels)

    $resources = query_resources(
                  "Class[\"${class_name}\"]",
                  'Prometheus::Redis_exporter[~".*"]',
                  true)
    $site_clusters = get_clusters({'site' => $site})

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