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

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.19746.3.1.*    # EMC Data Domain
        - 1.3.6.1.4.1.19746.3.1.1    # EMC dd200
        - 1.3.6.1.4.1.19746.3.1.2    # EMC dd200Proto
        - 1.3.6.1.4.1.19746.3.1.3    # EMC dd410
        - 1.3.6.1.4.1.19746.3.1.4    # EMC dd430
        - 1.3.6.1.4.1.19746.3.1.5    # EMC dd460
        - 1.3.6.1.4.1.19746.3.1.6    # EMC dd400g
        - 1.3.6.1.4.1.19746.3.1.7    # EMC dd460g
        - 1.3.6.1.4.1.19746.3.1.8    # EMC dd560
        - 1.3.6.1.4.1.19746.3.1.9    # EMC dd560g
        - 1.3.6.1.4.1.19746.3.1.10    # EMC dd580
        - 1.3.6.1.4.1.19746.3.1.11    # EMC dd580g
        - 1.3.6.1.4.1.19746.3.1.12    # EMC dd565
        - 1.3.6.1.4.1.19746.3.1.13    # EMC dd530
        - 1.3.6.1.4.1.19746.3.1.14    # EMC dd510
        - 1.3.6.1.4.1.19746.3.1.15    # EMC dd120
        - 1.3.6.1.4.1.19746.3.1.16    # EMC dd690
        - 1.3.6.1.4.1.19746.3.1.17    # EMC dd690g
        - 1.3.6.1.4.1.19746.3.1.18    # EMC dd660
        - 1.3.6.1.4.1.19746.3.1.19    # EMC dd880
        - 1.3.6.1.4.1.19746.3.1.20    # EMC dd880g
        - 1.3.6.1.4.1.19746.3.1.21    # EMC dd610
        - 1.3.6.1.4.1.19746.3.1.22    # EMC dd630
        - 1.3.6.1.4.1.19746.3.1.23    # EMC dd140
        - 1.3.6.1.4.1.19746.3.1.24    # EMC dd670
        - 1.3.6.1.4.1.19746.3.1.25    # EMC dd860
        - 1.3.6.1.4.1.19746.3.1.26    # EMC dd860g
        - 1.3.6.1.4.1.19746.3.1.27    # EMC dd890
        - 1.3.6.1.4.1.19746.3.1.28    # EMC dd640
        - 1.3.6.1.4.1.19746.3.1.29    # EMC dd620
        - 1.3.6.1.4.1.19746.3.1.30    # EMC dd160
        - 1.3.6.1.4.1.19746.3.1.31    # EMC ddintrepid
        - 1.3.6.1.4.1.19746.3.1.32    # EMC dd4500
        - 1.3.6.1.4.1.19746.3.1.33    # EMC dd7200
        - 1.3.6.1.4.1.19746.3.1.34    # EMC ddve
        - 1.3.6.1.4.1.19746.3.1.35    # EMC dd990
        - 1.3.6.1.4.1.19746.3.1.36    # EMC dd2500
        - 1.3.6.1.4.1.19746.3.1.37    # EMC dd4200

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

metrics:
  - MIB: HOST-RESOURCES-MIB
    symbol:
      name: memory.total
      OID: 1.3.6.1.2.1.25.2.3.1.5.1
      chart_meta:
        family: 'System/Memory/Total'
        description: Size of the storage represented by this entry in units of hrStorageAllocationUnits
        unit: "By"
  - MIB: HOST-RESOURCES-MIB
    symbol:
      name: memory.used
      OID: 1.3.6.1.2.1.25.2.3.1.6.1
      chart_meta:
        family: 'System/Memory/Used'
        description: Amount of the storage represented by this entry that is allocated in units of hrStorageAllocationUnits
        unit: "By"
  - MIB: HOST-RESOURCES-MIB
    symbol:
      OID: 1.3.6.1.2.1.25.2.3.1.6.6  # hrStorageUsed.6 = Memory buffers
      name: hrMemoryBuffers
      chart_meta:
        family: 'System/Memory/Buffers'
        description: Amount of the storage represented by this entry that is allocated in units of hrStorageAllocationUnits
        unit: "By"
  - MIB: HOST-RESOURCES-MIB
    symbol:
      OID: 1.3.6.1.2.1.25.2.3.1.6.7  # hrStorageUsed.7 = Cached memory
      name: hrCachedMemory
      chart_meta:
        family: 'System/Memory/Cached'
        description: Amount of the storage represented by this entry that is allocated in units of hrStorageAllocationUnits
        unit: "By"
  - MIB: DATA-DOMAIN-MIB
    symbol:
      name: fileSystemStatus
      OID: 1.3.6.1.4.1.19746.1.3.1.1.0
      chart_meta:
        family: 'Storage/FileSystem/Status'
        description: Status of the file system
        unit: "{status}"
      mapping:
        enabled: 1
        disabled: 2
        running: 3
        unknown: 4
        error: 5
        cleaning: 6

  - MIB: DATA-DOMAIN-MIB
    symbol:
      name: datadomain.fileSystemVirtualSpace
      OID: 1.3.6.1.4.1.19746.1.3.1.2.0
      chart_meta:
        family: 'Storage/FileSystem/VirtualSpace'
        description: Amount of uncompressed data that has been backed up by the system
        unit: "By"

  - MIB: DATA-DOMAIN-MIB
    table:
      name: powerModuleTable
      OID: 1.3.6.1.4.1.19746.1.1.1.1.1
    symbols:
      - OID: 1.3.6.1.4.1.19746.1.1.1.1.1.1.4
        name: powerModuleStatus
        chart_meta:
          family: 'Hardware/Power/Module/Status'
          description: Status of the power module
          unit: "{status}"
        mapping:
          0: absent
          1: ok
          2: failed
          3: faulty
          4: acnone
          99: unknown
    metric_tags:
      - tag: datadomain_power_module_description
        symbol:
          name: powerModuleDescription
          OID: 1.3.6.1.4.1.19746.1.1.1.1.1.1.3

  - MIB: DATA-DOMAIN-MIB
    table:
      name: temperatureSensorTable
      OID: 1.3.6.1.4.1.19746.1.1.2.1.1
    symbols:
      - OID: 1.3.6.1.4.1.19746.1.1.2.1.1.1.6
        name: tempSensorStatus
        chart_meta:
          family: 'Hardware/Sensor/Temperature/Status'
          description: Status of the temperature sensor
          unit: "{status}"
        mapping:
          0: failed
          1: ok
          2: notfound
          3: overheat_warning
          4: overheat_critical
    metric_tags:
      - tag: datadomain_temp_sensor_description
        symbol:
          name: tempSensorDescription
          OID: 1.3.6.1.4.1.19746.1.1.2.1.1.1.4

  - MIB: DATA-DOMAIN-MIB
    table:
      name: fanPropertiesTable
      OID: 1.3.6.1.4.1.19746.1.1.3.1.1
    symbols:
      - OID: 1.3.6.1.4.1.19746.1.1.3.1.1.1.6
        name: fanStatus
        chart_meta:
          family: 'Hardware/Fan/Status'
          description: Status of the fan
          unit: "{status}"
        mapping:
          0: notfound
          1: ok
          2: fail
      - OID: 1.3.6.1.4.1.19746.1.1.3.1.1.1.5
        name: fanLevel
        chart_meta:
          family: 'Hardware/Fan/Level'
          description: Speed level of the fan
          unit: "{status}"
        mapping:
          0: unknown
          1: low
          2: medium
          3: high
    metric_tags:
      - tag: datadomain_fan_description
        symbol:
          name: fanDescription
          OID: 1.3.6.1.4.1.19746.1.1.3.1.1.1.4

  - MIB: DATA-DOMAIN-MIB
    table:
      name: fileSystemSpaceTable
      OID: 1.3.6.1.4.1.19746.1.3.2.1
    symbols:
      - name: datadomain.fileSystemSpaceSize
        OID: 1.3.6.1.4.1.19746.1.3.2.1.1.4
        scale_factor: 1073741824 # GB => bytes
        chart_meta:
          family: 'Storage/FileSystem/Space/Total'
          description: Size of the file system resource in gigabytes
          unit: "By"
      - name: datadomain.fileSystemSpaceUsed
        OID: 1.3.6.1.4.1.19746.1.3.2.1.1.5
        scale_factor: 1073741824 # GB => bytes
        chart_meta:
          family: 'Storage/FileSystem/Space/Used'
          description: Amount of used space within the file system resource in gigabytes
          unit: "By"
      - name: datadomain.fileSystemSpaceAvail
        OID: 1.3.6.1.4.1.19746.1.3.2.1.1.6
        scale_factor: 1073741824 # GB => bytes
        chart_meta:
          family: 'Storage/FileSystem/Space/Available'
          description: Amount of available space within the file system resource in gigabytes
          unit: "By"
      - name: datadomain.fileSystemPercentUsed
        OID: 1.3.6.1.4.1.19746.1.3.2.1.1.7
        chart_meta:
          family: 'Storage/FileSystem/Space/Usage'
          description: Percentage of used space within the file system resource
          unit: "%"
      - name: datadomain.fileSystemSpaceCleanable
        OID: 1.3.6.1.4.1.19746.1.3.2.1.1.8
        scale_factor: 1073741824 # GB => bytes
        chart_meta:
          family: 'Storage/FileSystem/Space/Cleanable'
          description: Amount of file system space that can be cleaned
          unit: "By"
    metric_tags:
      - tag: datadomain_file_system_resource_name
        symbol:
          name: fileSystemResourceName
          OID: 1.3.6.1.4.1.19746.1.3.2.1.1.3
      - tag: datadomain_file_system_resource_tier
        symbol:
          name: fileSystemResourceTier
          OID: 1.3.6.1.4.1.19746.1.3.2.1.1.9

  - MIB: DATA-DOMAIN-MIB
    table:
      name: fileSystemCompressionTable
      OID: 1.3.6.1.4.1.19746.1.3.3.1
    symbols:
      - name: datadomain.fileSystemCompressionStartTime
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.3
        chart_meta:
          family: 'Storage/FileSystem/Compression/Time/Start'
          description: Start time of file system compression
          unit: "s"
      - name: datadomain.fileSystemCompressionEndTime
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.4
        chart_meta:
          family: 'Storage/FileSystem/Compression/Time/End'
          description: End time of file system compression
          unit: "s"
      - name: datadomain.fileSystemPreCompressionSize
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.5
        chart_meta:
          family: 'Storage/FileSystem/Compression/Size/Before'
          description: Size of file system before compression
          unit: "By"
      - name: datadomain.fileSystemPostCompressionSize
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.6
        chart_meta:
          family: 'Storage/FileSystem/Compression/Size/After'
          description: Size of file system after compression
          unit: "By"
      - name: datadomain.fileSystemGlobalCompressionFactor
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.7
        chart_meta:
          family: 'Storage/FileSystem/Compression/Factor/Global'
          description: Global compression factor of the file system
          unit: "1"
      - name: datadomain.fileSystemLocalCompressionFactor
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.8
        chart_meta:
          family: 'Storage/FileSystem/Compression/Factor/Local'
          description: Local compression factor of the file system
          unit: "1"
      - name: datadomain.fileSystemTotalCompressionFactor
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.9
        chart_meta:
          family: 'Storage/FileSystem/Compression/Factor/Total'
          description: Total compression factor of the file system
          unit: "1"
      - name: datadomain.fileSystemReductionPercent1
        OID: 1.3.6.1.4.1.19746.1.3.3.1.1.11
        chart_meta:
          family: 'Storage/FileSystem/Compression/Reduction'
          description: Percentage reduction of the file system size due to compression
          unit: "%"
    metric_tags:
      - tag: data_domain_file_system_compression_index
        symbol:
          name: fileSystemCompressionIndex
          OID: 1.3.6.1.4.1.19746.1.3.3.1.1.1

  - MIB: DATA-DOMAIN-MIB
    table:
      name: systemStatsTable
      OID: 1.3.6.1.4.1.19746.1.5.1.1
    symbols:
      - name: cpu.usage # cpu0PercentageBusy
        # TODO: need to collect both cpu0PercentageBusy and cpu1PercentageBusy
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.2
        chart_meta:
          family: 'System/CPU/Usage'
          description: The current CPU utilization
          unit: "%"
      - name: datadomain.nfsOpsPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.4
        chart_meta:
          family: 'Storage/NFS/Operation/Rate'
          description: Number of NFS operations performed per second
          unit: "{operation}/s"
      - name: datadomain.nfsIdlePercentage
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.5
        chart_meta:
          family: 'Storage/NFS/Time/Idle'
          description: Percentage of time NFS was idle
          unit: "%"
      - name: datadomain.nfsProcPercentage
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.6
        chart_meta:
          family: 'Storage/NFS/Time/Processing'
          description: Percentage of time NFS was processing
          unit: "%"
      - name: datadomain.nfsSendPercentage
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.7
        chart_meta:
          family: 'Storage/NFS/Time/Send'
          description: Percentage of time NFS was sending requests
          unit: "%"
      - name: datadomain.nfsReceivePercentage
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.8
        chart_meta:
          family: 'Storage/NFS/Time/Receive'
          description: Percentage of time NFS was receiving requests
          unit: "%"
      - name: datadomain.cifsOpsPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.9
        chart_meta:
          family: 'Storage/CIFS/Operation/Rate'
          description: Number of CIFS operations performed per second
          unit: "{operation}/s"
      - name: datadomain.diskReadKBytesPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.10
        scale_factor: 1024
        chart_meta:
          family: 'System/Disk/Throughput/Read'
          description: Number of kilobytes per second read from disk
          unit: "By/s"
      - name: datadomain.diskWriteKBytesPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.11
        scale_factor: 1024
        chart_meta:
          family: 'System/Disk/Throughput/Write'
          description: Number of kilobytes per second written to disk
          unit: "By/s"
      - name: datadomain.diskBusyPercentage
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.12
        chart_meta:
          family: 'System/Disk/Usage'
          description: Percentage of time disks were busy
          unit: "%"
      - name: datadomain.nvramReadKBytesPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.13
        scale_factor: 1024
        chart_meta:
          family: 'Hardware/NVRAM/Throughput/Read'
          description: Number of kilobytes read per second from NVRAM
          unit: "By/s"
      - name: datadomain.nvramWriteKBytesPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.14
        scale_factor: 1024
        chart_meta:
          family: 'Hardware/NVRAM/Throughput/Write'
          description: Number of kilobytes written per second to NVRAM
          unit: "By/s"
      - name: datadomain.replInKBytesPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.15
        scale_factor: 1024
        chart_meta:
          family: 'Storage/Replication/Throughput/In'
          description: Number of kilobytes per second received for replication
          unit: "By/s"
      - name: datadomain.replOutKBytesPerSecond
        OID: 1.3.6.1.4.1.19746.1.5.1.1.1.16
        scale_factor: 1024
        chart_meta:
          family: 'Storage/Replication/Throughput/Out'
          description: Number of kilobytes per second sent for replication
          unit: "By/s"
    metric_tags:
      - tag: datadomain_system_stats_index
        symbol:
          OID: 1.3.6.1.4.1.19746.1.5.1.1.1.1
          name: systemStatsIndex

  - MIB: DATA-DOMAIN-MIB
    table:
      name: diskPropertiesTable
      OID: 1.3.6.1.4.1.19746.1.6.1.1
    symbols:
      - OID: 1.3.6.1.4.1.19746.1.6.1.1.1.8
        name: diskPropState
        chart_meta:
          family: 'Hardware/Disk/Status'
          description: State of the disk
          unit: "{status}"
        mapping:
          1: ok
          2: unknown
          3: absent
          4: failed
          5: spare
          6: available
    metric_tags:
      - symbol:
          name: diskPropEnclosureID
          OID: 1.3.6.1.4.1.19746.1.6.1.1.1.1
        tag: datadomain_disk_prop_enclosure_id
      - symbol:
          name: diskPropIndex
          OID: 1.3.6.1.4.1.19746.1.6.1.1.1.2
        tag: datadomain_disk_prop_index
      - symbol:
          name: diskModel
          OID: 1.3.6.1.4.1.19746.1.6.1.1.1.4
        tag: datadomain_disk_model
      - symbol:
          name: diskFirmwareVersion
          OID: 1.3.6.1.4.1.19746.1.6.1.1.1.5
        tag: datadomain_disk_firmware_version
      - symbol:
          name: diskSerialNumber
          OID: 1.3.6.1.4.1.19746.1.6.1.1.1.6
        tag: datadomain_disk_serial_number
      - symbol:
          OID: 1.3.6.1.4.1.19746.1.6.1.1.1.9
          name: diskPack
        tag: datadomain_disk_pack
        mapping:
          0: notapplicable
          1: pack1
          2: pack2
          3: pack3
          4: pack4

  - MIB: DATA-DOMAIN-MIB
    table:
      name: diskPerformanceTable
      OID: 1.3.6.1.4.1.19746.1.6.2.1
    symbols:
      - name: datadomain.diskSectorsRead
        OID: 1.3.6.1.4.1.19746.1.6.2.1.1.3
        chart_meta:
          family: 'System/Disk/Sector/Read'
          description: Number of disk sectors read per second
          unit: "{sector}/s"
      - name: datadomain.diskSectorsWritten
        OID: 1.3.6.1.4.1.19746.1.6.2.1.1.4
        chart_meta:
          family: 'System/Disk/Sector/Write'
          description: Number of disk sectors written per second
          unit: "{sector}/s"
      - name: datadomain.diskTotalKBytes
        OID: 1.3.6.1.4.1.19746.1.6.2.1.1.5
        scale_factor: 1024
        chart_meta:
          family: 'System/Disk/Throughput/Total'
          description: Total number of kilobytes read or written per second
          unit: "By/s"
      - name: datadomain.diskBusy
        OID: 1.3.6.1.4.1.19746.1.6.2.1.1.6
        chart_meta:
          family: 'System/Disk/Busy'
          description: Percentage of time disk is busy
          unit: "%"
      - OID: 1.3.6.1.4.1.19746.1.6.2.1.1.7
        name: diskPerfState
        chart_meta:
          family: 'Hardware/Disk/Performance/Status'
          description: Performance state of the disk
          unit: "{status}"
        mapping:
          1: ok
          2: unknown
          3: absent
          4: failed
          5: spare
          6: available
    metric_tags:
      - tag: datadomain_disk_perf_index
        symbol:
          OID: 1.3.6.1.4.1.19746.1.6.2.1.1.2
          name: diskPerfIndex
