Skip to content

Instantly share code, notes, and snippets.

@nsapa
Created January 14, 2022 23:23
Show Gist options
  • Save nsapa/6cc119838bf7b8b6ef5ae71a6c90965f to your computer and use it in GitHub Desktop.
Save nsapa/6cc119838bf7b8b6ef5ae71a6c90965f to your computer and use it in GitHub Desktop.
prometheus-snmp-exporter: generator.yml: Override the wrong type for Synology OID
# Synology
#
# Synology MIBs can be found here:
# http://www.synology.com/support/snmp_mib.php
# http://dedl.synology.com/download/Document/MIBGuide/Synology_MIB_File.zip
#
# Tested on RS2414rp+ NAS
#
synology:
walk:
- interfaces
- sysUpTime
- ifXTable
- laNames
- laLoadInt
- ssCpuUser
- ssCpuSystem
- ssCpuIdle
- memory
- hrStorage
- 1.3.6.1.4.1.6574.1 # synoSystem
- 1.3.6.1.4.1.6574.2 # synoDisk
- 1.3.6.1.4.1.6574.3 # synoRaid
- 1.3.6.1.4.1.6574.4 # synoUPS
- 1.3.6.1.4.1.6574.5 # synologyDiskSMART
- 1.3.6.1.4.1.6574.6 # synologyService
- 1.3.6.1.4.1.6574.101 # storageIO
- 1.3.6.1.4.1.6574.102 # spaceIO
- 1.3.6.1.4.1.6574.104 # synologyiSCSILUN
lookups:
- source_indexes: [spaceIOIndex]
lookup: spaceIODevice
drop_source_indexes: true
- source_indexes: [storageIOIndex]
lookup: storageIODevice
drop_source_indexes: true
- source_indexes: [serviceInfoIndex]
lookup: serviceName
drop_source_indexes: true
- source_indexes: [ifIndex]
# Use OID to avoid conflict with Netscaler NS-ROOT-MIB.
lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName
drop_source_indexes: true
- source_indexes: [diskIndex]
lookup: diskID
drop_source_indexes: true
- source_indexes: [raidIndex]
lookup: raidName
drop_source_indexes: true
- source_indexes: [laIndex]
lookup: laNames
drop_source_indexes: true
- source_indexes: [hrStorageIndex]
lookup: hrStorageDescr
drop_source_indexes: true
overrides:
ifType:
type: EnumAsInfo
# Fix wrong type for Synology OID
1.3.6.1.4.1.6574.6.1.1.2: # serviceName
type: DisplayString
1.3.6.1.4.1.6574.1.5.1: # modelName
type: DisplayString
1.3.6.1.4.1.6574.1.5.2: # serialNumber
type: DisplayString
1.3.6.1.4.1.6574.1.5.3: # version
type: DisplayString
1.3.6.1.4.1.6574.2.1.1.2: # diskID
type: DisplayString
1.3.6.1.4.1.6574.2.1.1.3: # diskModel
type: DisplayString
1.3.6.1.4.1.6574.2.1.1.4: # diskType
type: DisplayString
1.3.6.1.4.1.6574.2.1.1.7: # diskRole
type: DisplayString
1.3.6.1.4.1.6574.2.1.1.12: # diskName
type: DisplayString
1.3.6.1.4.1.6574.3.1.1.2: # raidName
type: DisplayString
1.3.6.1.4.1.6574.5.1.1.2: # diskSMARTInfoDevName
type: DisplayString
1.3.6.1.4.1.6574.5.1.1.3: # diskSMARTAttrName
type: DisplayString
1.3.6.1.4.1.6574.5.1.1.9: # diskSMARTAttrStatus
type: DisplayString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment