mib: HUAWEI-DEVICE-MIB:HUAWEI-POWER-MIB:HWMUSA-DEV-MIB:HUAWEI-XPON-MIB:IF-MIB
modules:
    mempools:
        pre-cache:
            oids:
                - HWMUSA-DEV-MIB::hwMusaBoardSlotDesc
        data:
            -
                percent_used: HWMUSA-DEV-MIB::hwMusaBoardRamUseRate
                descr: 'Slot {{ $subindex1 }} {{ HWMUSA-DEV-MIB::hwMusaBoardSlotDesc }}'
                skip_values:
                    -
                        oid: HWMUSA-DEV-MIB::hwMusaBoardRamUseRate
                        op: '='
                        value: -1
    os:
        hardware:
            - ENTITY-MIB::entPhysicalDescr.36
            - ENTITY-MIB::entPhysicalDescr.888624
        hardware_regex: '/(?<hardware>[^,]+)/'
        serial: HUAWEI-DEVICE-MIB::hwBackplanePhySerialNum.0
        version: HUAWEI-DEVICE-MIB::hwSysVersionVrcb.0
    sensors:
        pre-cache:
            data:
                -
                    oid:
                        - hwFrameTypeName
                        - hwFrameIndex
                        - hwSlotIndex
                        - hwSlotTypeName
                        - hwPowerIndex
                        - hwPowerName
                        - ifName

        temperature:
            data:
                -
                    oid: hwGponOltOpticsDdmInfoEntry
                    value: hwGponOltOpticsDdmInfoTemperature
                    num_oid: '.1.3.6.1.4.1.2011.6.128.1.1.2.23.1.1.{{ $index }}'
                    descr: "SFP {{ $ifName }}"
                    group: SFPs
                    skip_value_gt: 999999
        voltage:
            data:
                -
                    oid: hwACVoltA
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.2.1.3.{{ $index }}'
                    divisor: 1000
                    descr: AC Input A
                    group: Power
                -
                    oid: hwDCVoltageOut
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.3.1.1.{{ $index }}'
                    divisor: 1000
                    descr: DC Output
                    group: Power
                -
                    oid: hwGponOltOpticsDdmInfoSupplyVoltage
                    num_oid: '.1.3.6.1.4.1.2011.6.128.1.1.2.23.1.2.{{ $index }}'
                    descr: "SFP {{ $ifName }}"
                    group: SFPs
                    divisor: 100
                    skip_value_gt: 999999

        dbm:
            data:
                -
                    oid: hwGponOltOpticsDdmInfoTxPower
                    num_oid: '.1.3.6.1.4.1.2011.6.128.1.1.2.23.1.4.{{ $index }}'
                    descr: "SFP {{ $ifName }} TX"
                    group: SFPs TX
                    index: 'tx-{{ $index }}'
                    divisor: 100
                    skip_value_gt: 999999

        current:
            data:
                -
                    oid: hwDCOutLoadCurrent
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.3.1.10.{{ $index }}'
                    divisor: 1000
                    descr: DC Total Output Load
                    group: Power
                -
                    oid: hwBatteryCurrent
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.6.3.1.6.{{ $index }}'
                    divisor: 1000
                    descr: Battery
                    group: Power
                -
                    oid: hwGponOltOpticsDdmInfoTxBiasCurrent
                    num_oid: '.1.3.6.1.4.1.2011.6.128.1.1.2.23.1.3.{{ $index }}'
                    descr: "SFP {{ $ifName }}"
                    group: SFPs
                    divisor: 1000
                    skip_value_gt: 999999

        count:
            data:
                -
                    oid: hwGponDeviceOltControlOntNum
                    num_oid: '.1.3.6.1.4.1.2011.6.128.1.1.2.21.1.16.{{ $index }}'
                    descr: "{{ $ifName }} Added ONTs"
                    group: ONTs Count
                    index: 'count-{{ $index }}'
                    skip_value_lt: 1
                -
                    oid: hwGponDeviceOltControlTcontNumInCard
                    num_oid: '.1.3.6.1.4.1.2011.6.128.1.1.2.21.1.21.{{ $index }}'
                    descr: "{{ $ifName }} T-CONT's"
                    group: T-CONTs Count
                    index: 'tconts-{{ $index }}'
                    skip_value_lt: 1

        state:
            data:
                -
                    oid: hwFrameOperStatus
                    num_oid: '.1.3.6.1.4.1.2011.6.3.3.1.1.5.{{ $index }}'
                    index: hwFrameIndex
                    group: Frames
                    descr: "Frame {{ $hwFrameIndex }} ({{ $hwFrameTypeName }}) Status"
                    state_name: hwFrameOperStatus
                    states:
                        - { value: 1, generic: 0, graph: 1, descr: 'normal' }
                        - { value: 2, generic: 2, graph: 1, descr: 'fault' }
                        - { value: 3, generic: 3, graph: 1, descr: 'other' }
                        - { value: 4, generic: 1, graph: 1, descr: 'discovery' }
                        - { value: 5, generic: 1, graph: 1, descr: 'mismatch' }
                        - { value: 6, generic: 3, graph: 1, descr: 'offline' }
                -
                    oid: hwPowerState
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.1.1.4.{{ $index }}'
                    descr: "Emu {{ $hwPowerIndex }} ({{ $hwPowerName }}) Status"
                    group: Power
                    state_name: hwPowerState
                    states:
                        - { value: 1, generic: 0, graph: 1, descr: 'normal' }
                        - { value: 2, generic: 2, graph: 1, descr: 'fault' }
                        - { value: 3, generic: 1, graph: 1, descr: 'protecting' }
                        - { value: 4, generic: 1, graph: 1, descr: 'switched' }
                -
                    oid: hwACPowerState
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.2.1.2.{{ $index }}'
                    descr: "AC Power State"
                    group: Power
                    state_name: hwACPowerState
                    states:
                        - { value: 1, generic: 0, graph: 1, descr: 'normal' }
                        - { value: 2, generic: 2, graph: 1, descr: 'offline' }
                        - { value: 3, generic: 1, graph: 1, descr: 'exceedVoltage' }
                        - { value: 4, generic: 1, graph: 1, descr: 'belowVoltage' }
                        - { value: 5, generic: 1, graph: 1, descr: 'backup' }
                -
                    oid: hwDCVoltageOutState
                    num_oid: '.1.3.6.1.4.1.2011.6.2.1.3.1.5.{{ $index }}'
                    descr: "DC Voltage Out State"
                    group: Power
                    state_name: hwDCVoltageOutState
                    states:
                        - { value: 1, generic: 0, graph: 1, descr: 'normal' }
                        - { value: 2, generic: 1, graph: 1, descr: 'exceedVoltage' }
                        - { value: 3, generic: 1, graph: 1, descr: 'belowVoltage' }
                -
                    oid: hwSlotOperStatus
                    num_oid: '.1.3.6.1.4.1.2011.6.3.3.2.1.8.{{ $index }}'
                    descr: "Slot {{ $hwSlotIndex }} ({{ $hwSlotTypeName }}) Status"
                    group: Boards
                    state_name: hwSlotOperStatus
                    states:
                        - { value: 1, generic: 0, graph: 1, descr: 'online' }
                        - { value: 2, generic: 0, graph: 1, descr: 'normal' }
                        - { value: 3, generic: 2, graph: 1, descr: 'fault' }
                        - { value: 4, generic: 3, graph: 1, descr: 'forbidden' }
                        - { value: 5, generic: 0, graph: 1, descr: 'autofind' }
                        - { value: 6, generic: 1, graph: 1, descr: 'config' }
                        - { value: 7, generic: 3, graph: 1, descr: 'offline' }
                        - { value: 8, generic: 2, graph: 1, descr: 'abnormal' }
                        - { value: 9, generic: 1, graph: 1, descr: 'versionerr' }
                        - { value: 10, generic: 1, graph: 1, descr: 'autoload' }
                        - { value: 11, generic: 3, graph: 1, descr: 'outofservice' }
                        - { value: 12, generic: 2, graph: 1, descr: 'graceful' }
                        - { value: 13, generic: 3, graph: 1, descr: 'shutdown' }
                        - { value: 14, generic: 1, graph: 1, descr: 'energysavingshutdown' }
                        - { value: 15, generic: 2, graph: 1, descr: 'hightemperatureshutdown' }
                        - { value: 16, generic: 3, graph: 1, descr: 'manualshutdown' }
                        - { value: 17, generic: 1, graph: 1, descr: 'mismatch' }
                        - { value: 18, generic: 2, graph: 1, descr: 'acoffshutdown' }
