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: {})


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
48
49
50
# File 'modules/facilities/manifests/monitor_pdu_1phase.pp', line 7

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 = {}
) {
    include facilities
    $_mgmt_parents = pick($mgmt_parents, $facilities::mgmt_parents)

    @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,
        }
    }
}