extends:
  - aruba.yaml
  - _std-host-resources-mib-feat-base.yaml

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

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.47196.4.1.1.1.*
        - 1.3.6.1.4.1.47196.4.1.1.1.1
        - 1.3.6.1.4.1.47196.4.1.1.1.2
        - 1.3.6.1.4.1.47196.4.1.1.1.3
        - 1.3.6.1.4.1.47196.4.1.1.1.5
        - 1.3.6.1.4.1.47196.4.1.1.1.50
        - 1.3.6.1.4.1.47196.4.1.1.1.70
        - 1.3.6.1.4.1.47196.4.1.1.1.101
        - 1.3.6.1.4.1.47196.4.1.1.1.103
        - 1.3.6.1.4.1.47196.4.1.1.1.104
        - 1.3.6.1.4.1.47196.4.1.1.1.150
        - 1.3.6.1.4.1.47196.4.1.1.1.304
        - 1.3.6.1.4.1.47196.4.1.1.1.405

metrics:
  - MIB: ARUBAWIRED-TEMPSENSOR-MIB
    table:
      OID: 1.3.6.1.4.1.47196.4.1.1.3.11.3.1
      name: arubaWiredTempSensorTable
    symbols:
      - name: arubaWiredTempSensorTemperature
        OID: 1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.7
        scale_factor: 0.001
        chart_meta:
          description: Current temperature value read from the temperature sensor
          family: 'Hardware/Sensor/Temperature/Value'
          unit: "Cel"
    metric_tags:
      - symbol:
          name: arubaWiredTempSensorName
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.5
        tag: aruba_wired_temp_sensor_name
  # TODO: find mapping and make it a metric
  #      - symbol:
  #          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.6
  #          name: arubaWiredTempSensorState
  #        tag: aruba_wired_temp_sensor_state
  - MIB: ARUBAWIRED-POWERSUPPLY-MIB
    table:
      OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1
      name: arubaWiredPowerSupplyTable
    symbols:
      - name: arubaWiredPSUInstantaneousPower
        OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.7
        chart_meta:
          description: Total instantaneous power supplied by the power supply in Watts.
          family: 'Hardware/PowerSupply/Power/Output'
          unit: "W"
      - name: arubaWiredPSUNumberFailures
        OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.9
        chart_meta:
          description: Number of failures the power supply has experienced since the most recent insertion of the power supply and boot of the system.
          family: 'Hardware/PowerSupply/Failure/Count'
          unit: "{failure}/s"
    metric_tags:
      - symbol:
          name: arubaWiredPSUName
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.3
        tag: aruba_wired_psu_name
      - symbol:
          name: arubaWiredPSUProductName
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.5
        tag: aruba_wired_psu_product_name
      - symbol:
          name: arubaWiredPSUSerialNumber
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.6
        tag: aruba_wired_psu_serial_number
      - symbol:
          name: arubaWiredPSUAirflowDirection
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.10
        tag: aruba_wired_psu_airflow_direction
  # TODO: find mapping and make it a metric
  #      - symbol:
  #          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.4
  #          name: arubaWiredPSUState
  #        tag: aruba_wired_psu_state

  # - MIB: ARUBAWIRED-FANTRAY-MIB
  #   table:
  #     OID: 1.3.6.1.4.1.47196.4.1.1.3.11.4.1
  #     name: arubaWiredFanTrayTable
  #   symbols:
  #     - name: arubaWiredFanTray
  #       constant_value_one: true
  #       description: This variable uniquely identifies the fan tray instance in a chassis and value 1 must be used for non-modular devices.
  #       unit: "{fan_tray}"
  #   metric_tags:
  #     - symbol:
  #         name: arubaWiredFanTrayName
  #         OID: 1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.3
  #       tag: aruba_wired_fan_tray_name
  #     - symbol:
  #         name: arubaWiredFanTrayProductName
  #         OID: 1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.5
  #       tag: aruba_wired_fan_tray_product_name
  #     - symbol:
  #         name: arubaWiredFanTraySerialNumber
  #         OID: 1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.6
  #       tag: aruba_wired_fan_tray_serial_number
  #     - symbol:
  #         OID: 1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.4
  #         name: arubaWiredFanTrayState
  #       tag: aruba_wired_fan_tray_state
  #  State has no mapping that I could find, so empty table.
  - MIB: ARUBAWIRED-FAN-MIB
    table:
      OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1
      name: arubaWiredFanTable
    symbols:
      - name: arubaWiredFanRPM
        OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.8
        chart_meta:
          description: Current RPM read for the fan.
          family: 'Hardware/Fan/Speed'
          unit: "{revolution}/min"
      - OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.5
        name: arubaWiredFanState
        chart_meta:
          description: Current status for the fan
          family: 'Hardware/Fan/Status'
          unit: "{status}"
        mapping:
          1: unknown
          2: empty
          3: uninitialized
          4: ok
          5: fault
    metric_tags:
      - tag: aruba_wired_fan_name
        symbol:
          name: arubaWiredFanName
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.4
      - tag: aruba_wired_fan_product_name
        symbol:
          name: arubaWiredFanProductName
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.6
      - tag: aruba_wired_fan_serial_number
        symbol:
          name: arubaWiredFanSerialNumber
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.7
      - tag: aruba_wired_fan_airflow_direction
        symbol:
          name: arubaWiredFanAirflowDirection
          OID: 1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.9
