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

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.25506.11.1.*

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

# https://mibbrowser.online/mibdb_search.php?mib=HH3C-ENTITY-EXT-MIB
# https://github.com/DanielleHuisman/observium-community-edition/blob/main/mibs/hh3c/HH3C-ENTITY-EXT-MIB

metrics:
  - MIB: HH3C-ENTITY-EXT-MIB
    table:
      OID: 1.3.6.1.4.1.25506.2.6.1.4.1
      name: hh3cProcessTable
    symbols:
      - OID: 1.3.6.1.4.1.25506.2.6.1.4.1.1.3
        name: hh3cProcessUtil5Min
        chart_meta:
          description: "General idea of how busy a process caused the processor to be over a 5 minute period"
          family: 'System/Process/CPU/Usage/5m'
          unit: "%"
    metric_tags:
      - tag: hh3c_process_name
        symbol:
          OID: 1.3.6.1.4.1.25506.2.6.1.4.1.1.2
          name: hh3cProcessName

  - MIB: HH3C-ENTITY-EXT-MIB
    table:
      OID: 1.3.6.1.4.1.25506.2.6.1.1.1
      name: hh3cEntityExtStateTable
    symbols:
      - OID: 1.3.6.1.4.1.25506.2.6.1.1.1.1.6
        name: cpu.usage # hh3cEntityExtCpuUsage
        chart_meta:
          description: The current CPU utilization
          family: 'System/CPU/Usage'
          unit: "%"
    metric_tags:
      - tag: cpu_index
        index: 1 # hh3cEntityExtPhysicalIndex
      - tag: hh3c_entity_ext_physical_index
        MIB: HH3C-ENTITY-EXT-MIB
        symbol:
          OID: 1.3.6.1.4.1.25506.2.6.1.1.1.1.1
          name: hh3cEntityExtPhysicalIndex
      - tag: _ent_physical_name
        MIB: ENTITY-MIB
        table: entPhysicalTable
        symbol:
          OID: 1.3.6.1.2.1.47.1.1.1.1.7
          name: entPhysicalName

  - MIB: HH3C-ENTITY-EXT-MIB
    table:
      OID: 1.3.6.1.4.1.25506.2.6.1.1.1
      name: hh3cEntityExtStateTable
    symbols:
      - OID: 1.3.6.1.4.1.25506.2.6.1.1.1.1.8
        name: memory.usage
        chart_meta:
          description: "Memory usage for the entity"
          family: 'System/Memory/Usage'
          unit: "%"
    metric_tags:
      - tag: mem_index
        index: 1 # hh3cEntityExtPhysicalIndex
      - tag: hh3c_entity_ext_physical_index
        MIB: HH3C-ENTITY-EXT-MIB
        symbol:
          OID: 1.3.6.1.4.1.25506.2.6.1.1.1.1.1
          name: hh3cEntityExtPhysicalIndex
      - tag: _ent_physical_name
        MIB: ENTITY-MIB
        table: entPhysicalTable
        symbol:
          OID: 1.3.6.1.2.1.47.1.1.1.1.7
          name: entPhysicalName
