extends:
  - brocade.yaml

metadata:
  device:
    fields:
      type:
        value: "Switch"

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.1588.2.1.1.*
        - 1.3.6.1.4.1.1588.2.1.1.32
        - 1.3.6.1.4.1.1588.2.1.1.44
        - 1.3.6.1.4.1.1588.2.1.1.62
        - 1.3.6.1.4.1.1588.2.1.1.64
        - 1.3.6.1.4.1.1588.2.1.1.66
        - 1.3.6.1.4.1.1588.2.1.1.71
        - 1.3.6.1.4.1.1588.2.1.1.72
        - 1.3.6.1.4.1.1588.2.1.1.77
        - 1.3.6.1.4.1.1588.2.1.1.83
        - 1.3.6.1.4.1.1588.2.1.1.109
        - 1.3.6.1.4.1.1588.2.1.1.117
        - 1.3.6.1.4.1.1588.2.1.1.118
        - 1.3.6.1.4.1.1588.2.1.1.120
        - 1.3.6.1.4.1.1588.2.1.1.133
        - 1.3.6.1.4.1.1588.2.1.3

metrics:
  - MIB: RESOURCE-MIB
    symbol:
      OID: 1.3.6.1.4.1.1588.2.1.1.1.26.1.0
      name: cpu.usage
      chart_meta:
        description: The current CPU utilization
        family: 'System/CPU/Usage'
        unit: "%"
  - MIB: RESOURCE-MIB
    symbol:
      OID: 1.3.6.1.4.1.1588.2.1.1.1.26.6.0
      name: memory.usage
      chart_meta:
        description: System's memory usage
        family: 'System/Memory/Usage'
        unit: "%"
  - MIB: FIBRE-CHANNEL-FE-MIB
    table:
      OID: 1.3.6.1.2.1.75.1.2.1
      name: fcFxPortStatusTable # fcFxPortStatusEntry AUGMENTS { fcFxPortEntry }
    symbols:
      - name: fcFxPortBbCreditAvailable
        OID: 1.3.6.1.2.1.75.1.2.1.1.2
        chart_meta:
          description: Buffers currently available for receiving frames from the attached port in the buffer-to-buffer flow control
          family: 'Network/FibreChannel/FxPort/Buffer/Available'
          unit: "{buffer}"
      - OID: 1.3.6.1.2.1.75.1.2.1.1.3
        name: fcFxPortOperMode
        chart_meta:
          description: Operational mode of the FxPort
          family: 'Network/FibreChannel/FxPort/Operational/Mode'
          unit: "{status}"
        mapping:
          1: unknown
          2: f_port
          3: fl_port
      - OID: 1.3.6.1.2.1.75.1.2.1.1.4
        name: fcFxPortAdminMode
        chart_meta:
          description: Desired operational mode of the FxPort
          family: 'Network/FibreChannel/FxPort/Admin/Mode'
          unit: "{status}"
        mapping:
          2: f_port
          3: fl_port
    metric_tags:
      - index: 1 # fcFeModuleIndex is index #1 of fcFxPortEntry
        tag: fc_fe_module_index
      - index: 2 # fcFxPortIndex is index #2 of fcFxPortEntry
        tag: fc_fx_port_index
  - MIB: FIBRE-CHANNEL-FE-MIB
    table:
      OID: 1.3.6.1.2.1.75.1.2.2
      name: fcFxPortPhysTable # fcFxPortStatusEntry AUGMENTS { fcFxPortEntry }
    symbols:
      - OID: 1.3.6.1.2.1.75.1.2.2.1.1
        name: fcFxPortPhysAdminStatus
        chart_meta:
          description: Desired state of the FxPort
          family: 'Network/FibreChannel/FxPort/Physical/Admin/Status'
          unit: "{status}"
        mapping:
          1: online
          2: offline
          3: testing
      - OID: 1.3.6.1.2.1.75.1.2.2.1.2
        name: fcFxPortPhysOperStatus
        chart_meta:
          description: Current operational status of the FxPort
          family: 'Network/FibreChannel/FxPort/Physical/Operational/Status'
          unit: "{status}"
        mapping:
          1: online
          2: offline
          3: testing
          4: link_failure
    metric_tags:
      - index: 1 # fcFeModuleIndex is index #1 of fcFxPortEntry
        tag: fc_fe_module_index
      - index: 2 # fcFxPortIndex is index #2 of fcFxPortEntry
        tag: fc_fx_port_index

  - MIB: SW-MIB
    table:
      name: swFCPortTable
      OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2
    symbols:
      - name: swFCPortTxFrames
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.13
        metric_type: monotonic_count
        chart_meta:
          description: Number of Fibre Channel frames transmitted by the port
          family: 'Network/FibreChannel/Port/Frame/Out'
          unit: "{frame}/s"
      - name: swFCPortRxFrames
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.14
        metric_type: monotonic_count
        chart_meta:
          description: Number of Fibre Channel frames received by the port
          family: 'Network/FibreChannel/Port/Frame/In'
          unit: "{frame}/s"
      - name: swFCPortRxC2Frames
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.15
        metric_type: monotonic_count
        chart_meta:
          description: Number of Class 2 frames received by the port
          family: 'Network/FibreChannel/Port/Frame/Class2/In'
          unit: "{frame}/s"
      - name: swFCPortRxC3Frames
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.16
        metric_type: monotonic_count
        chart_meta:
          description: Number of Class 3 frames received by the port
          family: 'Network/FibreChannel/Port/Frame/Class3/In'
          unit: "{frame}/s"
      - name: swFCPortRxLCs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.17
        metric_type: monotonic_count
        chart_meta:
          description: Number of Link Control frames received by the port
          family: 'Network/FibreChannel/Port/Frame/LinkControl/In'
          unit: "{frame}/s"
      - name: swFCPortTooManyRdys
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.19
        metric_type: monotonic_count
        chart_meta:
          description: Number of times when RDYs exceeds the frames received
          family: 'Network/FibreChannel/Port/RDY/Exceeded/Count'
          unit: "{time}/s"
      - name: swFCPortNoTxCredits
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.20
        metric_type: monotonic_count
        chart_meta:
          description: Number of times when the transmit credit has reached zero
          family: 'Network/FibreChannel/Port/Credit/Exhausted/Count'
          unit: "{time}/s"
      - name: swFCPortRxEncInFrs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21
        metric_type: monotonic_count
        chart_meta:
          description: Number of encoding or disparity errors inside frames received.
          family: 'Network/FibreChannel/Port/Error/Encoding/InFrame'
          unit: "{error}/s"
      - name: swFCPortRxCrcs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22
        metric_type: monotonic_count
        chart_meta:
          description: Number of CRC errors detected for frames received
          family: 'Network/FibreChannel/Port/Error/CRC'
          unit: "{error}/s"
      - name: swFCPortRcTruncs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.23
        metric_type: monotonic_count
        chart_meta:
          description: Number of truncated frames received by the port
          family: 'Network/FibreChannel/Port/Frame/Truncated/In'
          unit: "{frame}/s"
      - name: swFCPortRxTooLongs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.24
        metric_type: monotonic_count
        chart_meta:
          description: Number of received frames that are too long
          family: 'Network/FibreChannel/Port/Frame/TooLong/In'
          unit: "{frame}/s"
      - name: swFCPortRxBadEofs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.25
        metric_type: monotonic_count
        chart_meta:
          description: Number of received frames with bad EOF delimiter
          family: 'Network/FibreChannel/Port/Error/BadEOF'
          unit: "{frame}/s"
      - name: swFCPortRxEncOutFrs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26
        metric_type: monotonic_count
        chart_meta:
          description: Number of encoding or disparity errors outside frames received
          family: 'Network/FibreChannel/Port/Error/Encoding/OutFrame'
          unit: "{error}/s"
      - name: swFCPortRxBadOs
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.27
        metric_type: monotonic_count
        chart_meta:
          description: Number of invalid Ordered Sets received
          family: 'Network/FibreChannel/Port/Error/InvalidOrderedSet'
          unit: "{error}/s"
      - name: swFCPortC3Discards
        OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28
        metric_type: monotonic_count
        chart_meta:
          description: Number of Class 3 frames discarded by the port.
          family: 'Network/FibreChannel/Port/Frame/Class3/Discarded'
          unit: "{frame}/s"
    metric_tags:
      - symbol:
          name: swFCPortName
          OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36
        tag: sw_fc_port_name
      - symbol:
          name: swFCPortSpecifier
          OID: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.37
        tag: sw_fc_port_specifier
