Defined Type: prometheus::pdu_config

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

Overview

Parameters:

  • dest (Any)
  • site (Any)
  • model (Any) (defaults to: 'sentry3')
  • resource (Any) (defaults to: 'Facilities::Monitor_pdu_3phase')
  • labels (Any) (defaults to: {})


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'modules/prometheus/manifests/pdu_config.pp', line 11

define prometheus::pdu_config(
    $dest,
    $site,
    $model = 'sentry3',
    $resource = 'Facilities::Monitor_pdu_3phase',
    $labels = {},
) {
    validate_string($dest)
    validate_string($site)
    validate_hash($labels)

    $pdu_resources = query_resources(false, "${resource}[~\".*\"]{model=${model}}", false)

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