Defined Type: prometheus::pdu_config

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

Overview

Parameters:

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


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

define prometheus::pdu_config(
    String $dest,
    String $site,
    String $model    = 'sentry3',
    String $resource = 'Facilities::Monitor_pdu_3phase',
    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'),
    }
}