extends:
  - apc.yaml

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.318.1.3.4\..*
        - 1.3.6.1.4.1.318.1.3.15\..*
        - 1.3.6.1.4.1.318.1.3.24\..*
        - 1.3.6.1.4.1.318.1.3.35\..*

metadata:
  device:
    fields:
      type:
        value: PDU

metric_tags:
  - tag: powernet_r_pdu_ident_name
    OID: 1.3.6.1.4.1.318.1.1.12.1.1.0
    symbol: rPDUIdentName
  - tag: powernet_r_pdu_ident_hardware_rev
    OID: 1.3.6.1.4.1.318.1.1.12.1.2.0
    symbol: rPDUIdentHardwareRev
  - tag: powernet_r_pdu_ident_firmware_rev
    OID: 1.3.6.1.4.1.318.1.1.12.1.3.0
    symbol: rPDUIdentFirmwareRev
  - tag: powernet_r_pdu_ident_model_number
    OID: 1.3.6.1.4.1.318.1.1.12.1.5.0
    symbol: rPDUIdentModelNumber
  - tag: powernet_r_pdu_ident_serial_number
    OID: 1.3.6.1.4.1.318.1.1.12.1.6.0
    symbol: rPDUIdentSerialNumber

metrics:
  - MIB: PowerNet-MIB
    table:
      OID: 1.3.6.1.4.1.318.1.1.12.2.3.1
      name: rPDULoadStatusTable
    symbols:
      - OID: 1.3.6.1.4.1.318.1.1.12.2.3.1.1.2
        name: rPDULoadStatusLoad
        chart_meta:
          description: Phase/bank load
          family: 'Hardware/PhaseBank/Load/Current'
          unit: "A"
        scale_factor: 0.1
      - OID: 1.3.6.1.4.1.318.1.1.12.2.3.1.1.3
        name: rPDULoadStatusLoadState
        chart_meta:
          description: Phase/bank load state
          family: 'Hardware/PhaseBank/Load/Status'
          unit: "{status}"
        mapping:
          1: phase_load_normal
          2: phase_load_low
          3: phase_load_near_overload
          4: phase_load_overload
    metric_tags:
      - tag: powernet_r_pdu_load_status_index
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.2.3.1.1.1
          name: rPDULoadStatusIndex

  - MIB: PowerNet-MIB
    table:
      OID: 1.3.6.1.4.1.318.1.1.12.3.5.1
      name: rPDUOutletStatusTable
    symbols:
      - OID: 1.3.6.1.4.1.318.1.1.12.3.5.1.1.7
        name: rPDUOutletStatusLoad
        chart_meta:
          description: Outlet load for an Outlet Monitored Rack PDU
          family: 'Hardware/Outlet/Load/Current'
          unit: "A"
        scale_factor: 0.1
      - OID: 1.3.6.1.4.1.318.1.1.12.3.5.1.1.4
        name: rPDUOutletStatusOutletState
        chart_meta:
          description: Outlet state
          family: 'Hardware/Outlet/Power/Status'
          unit: "{status}"
        mapping:
          1: outlet_status_on
          2: outlet_status_off
    metric_tags:
      - tag: powernet_r_pdu_outlet_status_index
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.3.5.1.1.1
          name: rPDUOutletStatusIndex
      - tag: powernet_r_pdu_outlet_status_outlet_name
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.3.5.1.1.2
          name: rPDUOutletStatusOutletName

  - MIB: PowerNet-MIB
    symbol:
      OID: 1.3.6.1.4.1.318.1.1.12.4.1.1.0
      name: rPDUPowerSupply1Status
      chart_meta:
        family: 'Hardware/PowerSupply/1/Status'
        description: "Status of power supply 1"
        unit: "{status}"
      mapping:
        1: power_supply_one_ok
        2: power_supply_one_failed
  - MIB: PowerNet-MIB
    symbol:
      OID: 1.3.6.1.4.1.318.1.1.12.4.1.2.0
      name: rPDUPowerSupply2Status
      chart_meta:
        family: 'Hardware/PowerSupply/2/Status'
        description: "Status of power supply 2"
        unit: "{status}"
      mapping:
        1: power_supply_two_ok
        2: power_supply_two_failed
        3: power_supply_two_not_present

  - MIB: PowerNet-MIB
    symbol:
      OID: 1.3.6.1.4.1.318.1.1.12.4.1.3.0
      name: rPDUPowerSupplyAlarm
      chart_meta:
        description: Alarm status of the PDU power supply
        family: 'Hardware/PowerSupply/Alarm/Status'
        unit: "{status}"
      mapping:
        1: allAvailablePowerSuppliesOK
        2: powerSupplyOneFailed
        3: powerSupplyTwoFailed
        4: powerSupplyOneandTwoFailed
  - MIB: PowerNet-MIB
    table:
      OID: 1.3.6.1.4.1.318.1.1.12.5.2
      name: rPDUStatusBankTable
    symbols:
      - OID: 1.3.6.1.4.1.318.1.1.12.5.2.1.3
        name: rPDUStatusBankState
        chart_meta:
          description: Bank load state
          family: 'Hardware/Bank/Load/Status'
          unit: "{status}"
        mapping:
          1: bank_load_normal
          2: bank_load_low
          3: bank_load_near_overload
          4: bank_load_overload
    metric_tags:
      - tag: powernet_r_pdu_status_bank_index
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.5.2.1.1
          name: rPDUStatusBankIndex
      - tag: powernet_r_pdu_status_bank_number
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.5.2.1.2
          name: rPDUStatusBankNumber

  - MIB: PowerNet-MIB
    table:
      OID: 1.3.6.1.4.1.318.1.1.12.5.4
      name: rPDUStatusPhaseTable
    symbols:
      - OID: 1.3.6.1.4.1.318.1.1.12.5.4.1.3
        name: rPDUStatusPhaseState
        chart_meta:
          description: Phase Load state
          family: 'Hardware/Phase/Load/Status'
          unit: "{status}"
        mapping:
          1: phase_load_normal
          2: phase_load_low
          3: phase_load_near_overload
          4: phase_load_overload
    metric_tags:
      - tag: powernet_r_pdu_status_phase_index
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.5.4.1.1
          name: rPDUStatusPhaseIndex
      - tag: powernet_r_pdu_status_phase_number
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.5.4.1.2
          name: rPDUStatusPhaseNumber

  - MIB: PowerNet-MIB
    table:
      OID: 1.3.6.1.4.1.318.1.1.12.5.6
      name: rPDUStatusOutletTable
    symbols:
      - OID: 1.3.6.1.4.1.318.1.1.12.5.6.1.3
        name: rPDUStatusOutletState
        chart_meta:
          description: Outlet Load state
          family: 'Hardware/Outlet/Load/Status'
          unit: "{status}"
        mapping:
          1: outlet_load_normal
          2: outlet_load_low
          3: outlet_load_near_overload
          4: outlet_load_overload
    metric_tags:
      - tag: powernet_r_pdu_status_outlet_index
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.5.6.1.1
          name: rPDUStatusOutletIndex
      - tag: powernet_r_pdu_status_outlet_number
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.12.5.6.1.2
          name: rPDUStatusOutletNumber
  - MIB: PowerNet-MIB
    table:
      OID: 1.3.6.1.4.1.318.1.1.26.10.2.21
      name: rPDU2SensorTempHumidityStatusTable
    symbols:
      - OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.7
        name: rPDU2SensorTempHumidityStatusTempF
        chart_meta:
          description: Temperature in degrees Fahrenheit
          family: 'Hardware/Sensor/Temperature/Value'
          unit: "degF"
      - OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.8
        name: rPDU2SensorTempHumidityStatusTempC
        chart_meta:
          description: Temperature in degrees Celsius
          family: 'Hardware/Sensor/Temperature/Value'
          unit: "Cel"
      - OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.10
        name: rPDU2SensorTempHumidityStatusRelativeHumidity
        chart_meta:
          description: Relative humidity percentage
          family: 'Hardware/Sensor/Humidity/Value'
          unit: "%"
      - OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.9
        name: rPDU2SensorTempHumidityStatusTempStatus
        chart_meta:
          description: Current state of the temperature probe
          family: 'Hardware/Sensor/Temperature/Status'
          unit: "{status}"
        mapping:
          1: not_present
          2: below_min
          3: below_low
          4: normal
          5: above_high
          6: above_max
      - OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.11
        name: rPDU2SensorTempHumidityStatusHumidityStatus
        chart_meta:
          description: Current state of the humidity probe
          family: 'Hardware/Sensor/Humidity/Status'
          unit: "{status}"
        mapping:
          1: not_present
          2: below_min
          3: below_low
          4: normal
          5: above_high
          6: above_max
    metric_tags:
      - tag: powernet_r_pdu2_sensor_temp_humidity_status_name
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.3
          name: rPDU2SensorTempHumidityStatusName
      - tag: powernet_r_pdu2_sensor_temp_humidity_status_type
        symbol:
          OID: 1.3.6.1.4.1.318.1.1.26.10.2.2.1.5
          name: rPDU2SensorTempHumidityStatusType
        mapping:
          1: temperature_only
          2: temperature_humidity
          3: comms_lost
          4: not_installed
