Defined Type: facilities::monitor_pdu_1phase

Defined in:
modules/facilities/manifests/monitor_pdu_1phase.pp

Overview

Parameters:

  • ip (Stdlib::Ip_address)
  • row (String)
  • site (String)
  • breaker (Integer) (defaults to: 30)
  • redundant (Boolean) (defaults to: true)
  • model (String) (defaults to: 'sentry3')
  • mgmt_parents (Hash[String, String]) (defaults to: lookup('monitoring::mgmt_parents'))


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'modules/facilities/manifests/monitor_pdu_1phase.pp', line 6

define facilities::monitor_pdu_1phase(
    Stdlib::Ip_address $ip,
    String $row,
    String $site,
    Integer $breaker = 30,
    Boolean $redundant = true,
    String $model = 'sentry3',
    Hash[String, String] $mgmt_parents = lookup('monitoring::mgmt_parents'),  # lint:ignore:wmf_styleguide
) {

    @monitoring::host { $title:
        ip_address => $ip,
        group      => 'pdus',
        parents    => $mgmt_parents[$site],
    }

    facilities::monitor_pdu_service { "${title}-infeed-load-tower-A-single-phase":
        host      => $title,
        ip        => $ip,
        row       => $row,
        site      => $site,
        tower     => '1',
        infeed    => '1',
        breaker   => $breaker,
        redundant => $redundant,
        model     => $model,
    }

    if $redundant == true {
        facilities::monitor_pdu_service { "${title}-infeed-load-tower-B-single-phase":
            host      => $title,
            ip        => $ip,
            row       => $row,
            site      => $site,
            tower     => '2',
            infeed    => '1',
            breaker   => $breaker,
            redundant => $redundant,
            model     => $model,
        }
    }
}