extends:
  - _system-base.yaml
  - _std-host-resources-mib-feat-base.yaml
  - _std-if-mib.yaml

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.6876.4.1

metadata:
  device:
    fields:
      vendor:
        value: "VMware"
      type:
        value: "Server"

# VMWARE-RESOURCES-MIB
# https://mibbrowser.online/mibdb_search.php?mib=VMWARE-RESOURCES-MIB
# https://github.com/DanielleHuisman/observium-community-edition/blob/main/mibs/vmware/VMWARE-RESOURCES-MIB

# VMWARE-ENV-MIB
# https://mibbrowser.online/mibdb_search.php?mib=VMWARE-ENV-MIB
# https://github.com/DanielleHuisman/observium-community-edition/blob/main/mibs/vmware/VMWARE-ENV-MIB

metrics:
  - MIB: VMWARE-RESOURCES-MIB
    table:
      OID: 1.3.6.1.4.1.6876.3.5.2
      name: vmwHostBusAdapterTable
    symbols:
      - OID: 1.3.6.1.4.1.6876.3.5.2.1.4
        name: vmwHbaStatus
        chart_meta:
          description: Current HBA status
          family: 'Hardware/HBA/Status'
          unit: "{status}"
        mapping:
          1: unknown
          2: normal
          3: marginal
          4: critical
          5: failed
    metric_tags:
      - tag: vmw_hba_device_name
        symbol:
          name: vmwHbaDeviceName
          OID: 1.3.6.1.4.1.6876.3.5.2.1.2

  - MIB: VMWARE-ENV-MIB
    table:
      OID: 1.3.6.1.4.1.6876.4.20.3
      name: vmwEnvTable
    symbols:
      - OID: 1.3.6.1.4.1.6876.4.20.3.1.3
        name: vmwHardwareStatus
        chart_meta:
          description: Last reported status of this component
          family: 'Hardware/Component/Status'
          unit: "{status}"
        mapping:
          1: unknown
          2: normal
          3: marginal
          4: critical
          5: failed
    metric_tags:
      - tag: vmw_subsystem_index
        index: 1
      - tag: vmw_subsystem_type
        symbol:
          name: vmwSubsystemType
          OID: 1.3.6.1.4.1.6876.4.20.3.1.2
        mapping:
          1: unknown
          2: chassis
          3: power_supply
          4: fan
          5: cpu
          6: memory
          7: battery
          8: temperature_sensor
          9: raid_controller
          10: voltage
