extends:
  - _std-if-mib.yaml
  - _hp.yaml
  - _hp-base.yaml

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.11.2.51

metadata:
  device:
    fields:
      type:
        value: "Storage"

metric_tags:
  - tag: hpe_fibrechannel_cpq_si_sys_serial_num
    OID: 1.3.6.1.4.1.232.2.2.2.1
    symbol: cpqSiSysSerialNum
  - OID: 1.3.6.1.4.1.232.2.2.2.6
    symbol: cpqSiSysProductId
    tag: hpe_fibrechannel_cpq_si_sys_product_id
  - tag: hpe_fibrechannel_cpq_si_product_name
    OID: 1.3.6.1.4.1.232.2.2.4.2
    symbol: cpqSiProductName

# https://mibbrowser.online/mibdb_search.php?mib=FCMGMT-MIB

metrics:
  - MIB: FCMGMT-MIB
    table:
      OID: 1.3.6.1.3.94.1.8
      name: connUnitSensorTable
    symbols:
      - OID: 1.3.6.1.3.94.1.8.1.4
        name: connUnitSensorStatus
        chart_meta:
          description: The status indicated by the sensor
          family: 'Hardware/Sensor/Status'
          unit: "{status}"
        mapping:
          1: unknown
          2: other
          3: ok
          4: warning
          5: failed
    metric_tags:
      - tag: hpe_fibrechannel_conn_unit_sensor_unit_id
        symbol:
          OID: 1.3.6.1.3.94.1.8.1.1
          name: connUnitSensorUnitId
      - tag: hpe_fibrechannel_conn_unit_sensor_index
        symbol:
          OID: 1.3.6.1.3.94.1.8.1.2
          name: connUnitSensorIndex
      - tag: hpe_fibrechannel_conn_unit_sensor_name
        symbol:
          OID: 1.3.6.1.3.94.1.8.1.3
          name: connUnitSensorName
      - tag: hpe_fibrechannel_conn_unit_sensor_characteristic
        symbol:
          OID: 1.3.6.1.3.94.1.8.1.8
          name: connUnitSensorCharacteristic
        mapping:
          1: unknown
          2: other
          3: temperature
          4: pressure
          5: emf
          6: current_value
          7: airflow
          8: frequency
          9: power
          10: door

  - MIB: FCMGMT-MIB
    table:
      OID: 1.3.6.1.3.94.1.10
      name: connUnitPortTable
    symbols:
      - OID: 1.3.6.1.3.94.1.10.1.6
        name: connUnitPortState
        chart_meta:
          description: The user selected state of the port hardware
          family: 'Network/FibreChannel/Port/Admin/Status'
          unit: "{status}"
        mapping:
          1: unknown
          2: online
          3: offline
          4: bypassed
          5: diagnostics
      - OID: 1.3.6.1.3.94.1.10.1.7
        name: connUnitPortStatus
        chart_meta:
          description: An overall protocol status for the port
          family: 'Network/FibreChannel/Port/Operational/Status'
          unit: "{status}"
        mapping:
          1: unknown
          2: unused
          3: ready
          4: warning
          5: failure
          6: notparticipating
          7: initializing
          8: bypass
          9: ols
    metric_tags:
      - tag: hpe_fibrechannel_conn_unit_port_unit_id
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.1
          name: connUnitPortUnitId
      - tag: hpe_fibrechannel_conn_unit_port_index
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.2
          name: connUnitPortIndex
      - tag: hpe_fibrechannel_conn_unit_port_type
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.3
          name: connUnitPortType
        mapping:
          1: unknown
          2: other
          3: not-present
          4: hub-port
          5: n-port
          6: nl-port
          7: fl-port
          8: f-port
          9: e-port
          10: g-port
          11: domain-ctl
          12: hub-controller
          13: scsi
          14: escon
          15: lan
          16: wan
          17: ac
          18: dc
          19: ssa
      - tag: hpe_fibrechannel_conn_unit_port_transmitter_type
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.8
          name: connUnitPortTransmitterType
        mapping:
          1: unknown
          2: other
          3: unused
          4: shortwave
          5: longwave
          6: copper
          7: scsi
          8: longwave_no_ofc
          9: shortwave_no_ofc
          10: longwave_led
          11: ssa
      - tag: hpe_fibrechannel_conn_unit_port_module_type
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.9
          name: connUnitPortModuleType
        mapping:
          1: unknown
          2: other
          3: gbic
          4: embedded
          5: glm
          6: gbic_serial_id
          7: gbic_no_serial_id
          8: gbic_not_installed
          9: small_form_factor
      - tag: _hpe_fibrechannel_conn_unit_port_wwn
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.10
          name: connUnitPortWwn
      - tag: _hpe_fibrechannel_conn_unit_port_speed
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.15
          name: connUnitPortSpeed
      - tag: _hpe_fibrechannel_conn_unit_port_name
        symbol:
          OID: 1.3.6.1.3.94.1.10.1.17
          name: connUnitPortName
