metrics:
  # Generic device health metrics for HP devices.
  # The latest version of these MIBs can be downloaded here:
  # https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_53293d026fb147958b223069b6

  # System utilization.

  # Total time the system has been in full operation.
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.8.1.0
      name: cpqHeSysUtilLifeTime
      scale_factor: 60
      chart_meta:
        family: 'System/Uptime'
        description: Total time the system has been in full operation in minutes
        unit: "s"

    # EISA bus utilization as percentage of theoretical maximum during last minute.
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.8.2.0
      name: cpqHeSysUtilEisaBusMin
      chart_meta:
        family: 'Hardware/Bus/EISA/Usage'
        description: EISA bus utilization as a percentage of the theoretical maximum during the last minute
        unit: "%"

    # Critical errors.

    # Overall condition of the critical error log feature.
    # NOTE: other(1), ok(2), degraded(3), failed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.2.2.0
      name: cpqHeCritLogCondition
      chart_meta:
        family: 'System/ErrorLog/Critical/Status'
        description: Overall condition of the critical error log feature
        unit: "{status}"
      mapping:
        1: other
        2: ok
        3: degraded
        4: failed

    # Correctable memory errors tracking.

    # Overall status of the correctable memory error log feature.
    # NOTE: other(1), notSupported(2), disabled(3), enabled(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.3.1.0
      name: cpqHeCorrMemLogStatus
      chart_meta:
        family: 'Hardware/Memory/ErrorLog/Status'
        description: Overall status of the correctable memory error log feature
        unit: "{status}"
      mapping:
        1: other
        2: not_supported
        3: disabled
        4: enabled

    # Overall condition of the correctable memory error log feature.
    # NOTE: other(1), ok(2), degraded(3), failed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.3.2.0
      name: cpqHeCorrMemLogCondition
      chart_meta:
        family: 'Hardware/Memory/ErrorLog/Condition/Status'
        description: Overall condition of the correctable memory error log feature
        unit: "{status}"
      mapping:
        1: other
        2: ok
        3: degraded
        4: failed

    # Number of correctable memory errors that have occurred.
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.3.3.0
      name: cpqHeCorrMemTotalErrs
      chart_meta:
        family: 'Hardware/Memory/Error/Correctable/Count'
        description: Number of correctable memory errors that have occurred
        unit: "{error}"
      metric_type: monotonic_count

    # ASR (Automatic Server Recovery)

    # Overall status of the ASR feature.
    # NOTE: other(1), notAvailable(2), disabled(3), enabled(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.5.1.0
      name: cpqHeAsrStatus
      chart_meta:
        family: 'Hardware/ASR/Status'
        description: Overall status of the ASR feature
        unit: "{status}"
      mapping:
        1: other
        2: not_available
        3: disabled
        4: enabled

    # Whether the ASR timer passed the server Power-On Self-Test (POST).
    # NOTE: other(1), failed(2), ok(3)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.5.6.0
      name: cpqHeAsrPost
      chart_meta:
        family: 'Hardware/ASR/POST/Status'
        description: Whether the ASR timer passed the server Power-On Self-Test
        unit: "{status}"
      mapping:
        1: other
        2: failed
        3: ok

    # Number of ASR reboots that occurred on the server since last manual reboot.
    # NOTE: -1 if not supported.
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.5.10.0
      name: cpqHeAsrRebootCount
      chart_meta:
        family: 'Hardware/ASR/Reboot/Count'
        description: Number of ASR reboots that have occurred on the server since last manual reboot
        unit: "{reboot}"
      metric_type: monotonic_count

    # Overall condition of the ASR feature.
    # NOTE: other(1), notAvailable(2), disabled(3), enabled(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.5.17.0
      name: cpqHeAsrCondition
      chart_meta:
        family: 'Hardware/ASR/Condition/Status'
        description: Overall condition of the ASR feature
        unit: "{status}"
      mapping:
        1: other
        2: not_available
        3: disabled
        4: enabled

    # Status of the ASR network access feature.
    # NOTE: other(1), disabled(2), enabled(3)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.5.21.0
      name: cpqHeAsrNetworkAccessStatus
      chart_meta:
        family: 'Hardware/ASR/NetworkAccess/Status'
        description: Status of the ASR network access feature
        unit: "{status}"
      mapping:
        1: other
        2: disabled
        3: enabled

    # Temperature and fans.

    # Status of temperature sensors.
    # NOTE: other(1), ok(2), degraded(3), failed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.6.3.0
      name: cpqHeThermalTempStatus
      chart_meta:
        family: 'Hardware/Temperature/Status/Overall'
        description: Status of the system's temperature sensors
        unit: "{status}"
      mapping:
        1: other
        2: ok
        3: degraded
        4: failed

    # Status of fan(s).
    # NOTE: other(1), ok(2), degraded(3), failed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.6.4.0
      name: cpqHeThermalSystemFanStatus
      chart_meta:
        family: 'Hardware/Fan/System/Status'
        description: Status of the fan(s) in the system
        unit: "{status}"
      mapping:
        1: other
        2: ok
        3: degraded
        4: failed

    # Status of processor fan(s).
    # NOTE: other(1), ok(2), failed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.6.5.0
      name: cpqHeThermalCpuFanStatus
      chart_meta:
        family: 'Hardware/Fan/CPU/Status'
        description: Status of the processor fan(s) in the system
        unit: "{status}"
      mapping:
        1: other
        2: ok
        4: failed

    # Temperator sensors.
  - MIB: CPQHLTH-MIB
    table:
      OID: 1.3.6.1.4.1.232.6.2.6.8
      name: cpqHeTemperatureTable
    symbols:
      - OID: 1.3.6.1.4.1.232.6.2.6.8.1.4
        name: cpqHeTemperatureCelsius
        chart_meta:
          family: 'Hardware/Sensor/Temperature/Value'
          description: Current temperature sensor reading in degrees celsius
          unit: "Cel"
        # NOTE: other(1), ok(2), degraded(3), failed(4)
      - OID: 1.3.6.1.4.1.232.6.2.6.8.1.6
        name: cpqHeTemperatureCondition
        chart_meta:
          family: 'Hardware/Sensor/Temperature/Status'
          description: Temperature sensor condition
          unit: "{status}"
        mapping:
          1: other
          2: ok
          3: degraded
          4: failed
    metric_tags:
      - tag: temperature_index
        symbol:
          OID: 1.3.6.1.4.1.232.6.2.6.8.1.3
          name: cpqHeTemperatureIndex

    # Power supplies.

    # Current power meter reading in Watts.
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.15.3.0
      name: cpqHePowerMeterCurrReading
      chart_meta:
        family: 'Hardware/Power/Usage'
        description: Current power meter reading in watts
        unit: "W"

    # A table of battery entries.
  - MIB: CPQHLTH-MIB
    table:
      OID: 1.3.6.1.4.1.232.6.2.17.2
      name: cpqHeSysBatteryTable
    symbols:
      # NOTE: other(1), ok(2), degraded(3), failed(4)
      - OID: 1.3.6.1.4.1.232.6.2.17.2.1.4
        name: cpqHeSysBatteryCondition
        chart_meta:
          family: 'Hardware/Battery/Condition/Status'
          description: Overall condition of the battery
          unit: "{status}"
        mapping:
          1: other
          2: ok
          3: degraded
          4: failed
        # NOTE: 15 different statuses are possible -- not listed here, see MIB.
      - OID: 1.3.6.1.4.1.232.6.2.17.2.1.5
        name: cpqHeSysBatteryStatus
        chart_meta:
          family: 'Hardware/Battery/Status'
          description: Status of the battery
          unit: "{status}"
    metric_tags:
      - tag: battery_index
        symbol:
          OID: 1.3.6.1.4.1.232.6.2.17.2.1.2
          name: cpqHeSysBatteryIndex

    # Overall condition of the thermal environment.
    # NOTE: other(1), ok(2), degraded(3), failed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.6.1.0
      name: cpqHeThermalCondition
      chart_meta:
        family: 'Hardware/Temperature/Environment/Status'
        description: Overall condition of the system's thermal environment
        unit: "{status}"
      mapping:
        1: other
        2: ok
        3: degraded
        4: failed
    # NOTE: other(1), notSupported(2), notInstalled(3), installed(4)
  - MIB: CPQHLTH-MIB
    symbol:
      OID: 1.3.6.1.4.1.232.6.2.9.2.0
      name: cpqHeFltTolPwrSupplyStatus
      chart_meta:
        family: 'Hardware/Power/FaultTolerant/Status'
        description: Status of the fault tolerant power supply
        unit: "{status}"
      mapping:
        1: other
        2: not_supported
        3: not_installed
        4: installed

  - MIB: CPQHLTH-MIB
    table:
      OID: 1.3.6.1.4.1.232.6.2.14.13
      name: cpqHeResMem2ModuleTable
    symbols:
      - OID: 1.3.6.1.4.1.232.6.2.14.13.1.20
        name: cpqHeResMem2ModuleCondition
        chart_meta:
          family: 'Hardware/Memory/Module/Status'
          description: Current status of the correctable memory errors for this memory module
          unit: "{status}"
    metric_tags:
      - tag: mem_board_index
        symbol:
          OID: 1.3.6.1.4.1.232.6.2.14.13.1.15
          name: cpqHeResMem2ModuleCellTablePtr

  - MIB: CPQHLTH-MIB
    table:
      OID: 1.3.6.1.4.1.232.6.2.9.3
      name: cpqHeFltTolPowerSupplyTable
    symbols:
      - name: cpqHeFltTolPowerSupply
        constant_value_one: true
        chart_meta:
          family: 'Hardware/PowerSupply/Present'
          description: Indicates the presence of a power supply
          unit: "{present}"
      - OID: 1.3.6.1.4.1.232.6.2.9.3.1.7
        name: cpqHeFltTolPowerSupplyCapacityUsed
        chart_meta:
          family: 'Hardware/PowerSupply/Used'
          description: Currently used capacity of the power supply in watts
          unit: "W"
      - OID: 1.3.6.1.4.1.232.6.2.9.3.1.8
        name: cpqHeFltTolPowerSupplyCapacityMaximum
        chart_meta:
          family: 'Hardware/PowerSupply/Capacity'
          description: Maximum capacity of the power supply in watts
          unit: "W"
      - OID: 1.3.6.1.4.1.232.6.2.9.3.1.5
        name: cpqHeFltTolPowerSupplyStatus
        chart_meta:
          description: Current status of the power supply
          family: 'Hardware/PowerSupply/Status'
          unit: "{status}"
        mapping:
          1: no_error
          2: general_failure
          3: bist_failure
          4: fan_failure
          5: temp_failure
          6: interlock_open
          7: eprom_failed
          8: vref_failed
          9: dac_failed
          10: ram_test_failed
          11: voltage_channel_failed
          12: orringdiode_failed
          13: brown_out
          14: giveup_on_startup
          15: nvram_invalid
          16: calibration_table_invalid
          17: no_power_input
    metric_tags:
      - tag: power_supply_index
        index: 1
      - tag: chassis_num
        symbol:
          OID: 1.3.6.1.4.1.232.6.2.9.3.1.1
          name: cpqHeFltTolPowerSupplyChassis
