Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UBNT AirOS module (older firmware) and other #1344

Merged
merged 8 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ APC_URL := https://download.schneider-electric.com/files?p_File_Name=p
ARISTA_URL := https://www.arista.com/assets/data/docs/MIBS
CISCO_URL := https://raw.githubusercontent.com/cisco/cisco-mibs/f55dc443daff58dfc86a764047ded2248bb94e12/v2
DELL_URL := https://dl.dell.com/FOLDER11196144M/1/Dell-OM-MIBS-11010_A00.zip
DLINK_URL := https://ftp.dlink.de/des/des-3200-18/driver_software/DES-3200-18_mib_revC_4-04_all_en_20130603.zip
ELTEX_MES_URL := https://eltex-co.com/upload/iblock/93c/80760x03yv4m8crugf0b8ab5yo8tel34/mibs_10.3.6.6.zip
HPE_URL := https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1580676047/v229101/upd11.85mib.tar.gz
IANA_CHARSET_URL := https://www.iana.org/assignments/ianacharset-mib/ianacharset-mib
IANA_IFTYPE_URL := https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib
Expand All @@ -52,6 +54,7 @@ SERVERTECH_URL := 'https://cdn10.servertech.com/assets/documents/documents/81
SERVERTECH4_URL := 'https://cdn10.servertech.com/assets/documents/documents/815/original/Sentry4.mib'
SYNOLOGY_URL := 'https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_MIB_File.zip'
UBNT_AIROS_URL := https://dl.ubnt.com/firmwares/airos-ubnt-mib/ubnt-mib.zip
UBNT_AIROS_OLD_URL:= https://raw.githubusercontent.com/pgmillon/observium/refs/heads/master/mibs/FROGFOOT-RESOURCES-MIB
UBNT_AIRFIBER_URL := https://dl.ubnt.com/firmwares/airfiber5X/v4.1.0/UBNT-MIB.txt
UBNT_DL_URL := http://dl.ubnt-ut.com/snmp
RARITAN_URL := https://cdn.raritan.com/download/PX/v1.5.20/PDU-MIB.txt
Expand Down Expand Up @@ -86,6 +89,7 @@ clean:
$(MIBDIR)/.cisco_v2 \
$(MIBDIR)/.cisco_imc \
$(MIBDIR)/.dell \
$(MIBDIR)/.dlink-mibs \
$(MIBDIR)/.hpe-mib \
$(MIBDIR)/.net-snmp \
$(MIBDIR)/.paloalto_panos \
Expand All @@ -95,6 +99,7 @@ clean:
$(MIBDIR)/.tplinkddm \
$(MIBDIR)/readynas \
$(MIBDIR)/readydataos \
$(MIBDIR)/.eltex-mes \
$(MIBDIR)/.juniper

generator: *.go
Expand Down Expand Up @@ -169,6 +174,9 @@ mibs: \
$(MIBDIR)/EAP-Client.MIB \
$(MIBDIR)/powercom \
$(MIBDIR)/.cisco_imc \
$(MIBDIR)/FROGFOOT-RESOURCES-MIB \
$(MIBDIR)/.dlink-mibs \
$(MIBDIR)/.eltex-mes \
$(MIBDIR)/.juniper

$(MIBDIR)/apc-powernet-mib:
Expand Down Expand Up @@ -357,6 +365,28 @@ $(MIBDIR)/UBNT-AirFiber-MIB:
@echo ">> Downloading UBNT-AirFiber-MIB"
@curl $(CURL_OPTS) -o $(MIBDIR)/UBNT-AirFiber-MIB $(UBNT_AIRFIBER_URL)

$(MIBDIR)/FROGFOOT-RESOURCES-MIB:
@echo ">> Downloading FROGFOOT-RESOURCES-MIB (UBNT AirOS)"
@curl $(CURL_OPTS) -o $(MIBDIR)/FROGFOOT-RESOURCES-MIB $(UBNT_AIROS_OLD_URL)

$(MIBDIR)/.dlink-mibs:
@echo ">> Downloading DLINK mibs"
$(eval TMP := $(shell mktemp))
@echo ">> Downloading DLINK DES mibs to $(TMP)"
@curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(TMP) $(DLINK_URL)
@unzip -j -d $(MIBDIR) $(TMP) \
DES3200_V4.04_MIB_20120906/standardMIB/RMON2-MIB.MIB \
DES3200_V4.04_MIB_20120906/standardMIB/RMON-MIB.mib \
DES3200_V4.04_MIB_20120906/standardMIB/token-ring-rmon-mib.MIB \
DES3200_V4.04_MIB_20120906/standardMIB/P-BRIDGE-MIB.mib \
DES3200_V4.04_MIB_20120906/standardMIB/BRIDGE-MIB.mib \
DES3200_V4.04_MIB_20120906/standardMIB/Q-BRIDGE-MIB.mib \
DES3200_V4.04_MIB_20120906/proprietaryMIB/Dlink-common-mgmt/Genmgmt.mib \
DES3200_V4.04_MIB_20120906/proprietaryMIB/Dlink-mgmt/DLINK-ID-REC-MIB.mib
@rm -v $(TMP)
@touch $(MIBDIR)/.dlink-mibs


$(MIBDIR)/UBNT-AirMAX-MIB.txt:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading ubnt-airos to $(TMP)"
Expand Down Expand Up @@ -434,6 +464,14 @@ $(MIBDIR)/.cisco_imc:
@curl $(CURL_OPTS) -o $(MIBDIR)/CISCO-SMI.my "$(CISCO_CUCS_URL_v2)/CISCO-SMI.my"
@touch $(MIBDIR)/.cisco_imc

$(MIBDIR)/.eltex-mes:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading Eltex MES device mibs to $(TMP)"
@curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(TMP) $(ELTEX_MES_URL)
@unzip -j -d $(MIBDIR) $(TMP) fsiss.mib eltex/ELTEX-SMI-ACTUAL.mib eltex/ELTEX-MES-ISS-CPU-UTIL-MIB.mib eltex/ELTEX-MES-ISS-MIB.mib CISCO-QOS-PIB-MIB.mib
@rm -v $(TMP)
@touch $(MIBDIR)/.eltex-mes

$(MIBDIR)/.juniper:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading Juniper mibs to $(TMP)"
Expand Down
31 changes: 31 additions & 0 deletions generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ modules:
- 1.3.6.1.4.1.674.10892.5.4 # systemDetailsGroup
- 1.3.6.1.4.1.674.10892.5.5 # storageDetailsGroup

# D-Link managed switches (DES-3200)
dlink:
walk:
- AGENT-GENERAL-MIB::agentCPUutilization
- AGENT-GENERAL-MIB::agentDRAMutilizationTable
overrides:
agentDRAMutilizationUnitID:
ignore: true
# MES 2448P
eltex_mes:
walk:
- ELTEX-MES-ISS-CPU-UTIL-MIB::eltMesIssCpuUtilLast5Seconds # CPU 0-100%
- ELTEX-MES-ISS-CPU-UTIL-MIB::eltMesIssCpuUtilLastMinute # CPU 0-100%
- ELTEX-MES-ISS-CPU-UTIL-MIB::eltMesIssCpuUtilLast5Minutes # CPU 0-100%
- ARICENT-ISS-MIB::issSwitchCurrentRAMUsage # Memory

# HPE MIBs
hpe:
walk:
Expand Down Expand Up @@ -452,6 +468,21 @@ modules:
walk:
- 1.3.6.1.4.1.41112.1.4 # ubntAirMAX

# Ubiquiti / AirOS (nanoStation etc, old firmwares)
ubiquiti_airos:
walk:
- FROGFOOT-RESOURCES-MIB::loadTable
- FROGFOOT-RESOURCES-MIB::memory
lookups:
- source_indexes: [loadIndex]
lookup: "FROGFOOT-RESOURCES-MIB::loadDescr"
overrides:
loadIndex:
ignore: true # Lookup metric
loadDescr:
ignore: true


# Ubiquiti / UniFi
#
# http://dl.ubnt-ut.com/snmp/UBNT-MIB
Expand Down
96 changes: 96 additions & 0 deletions snmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13027,6 +13027,45 @@ modules:
indexes:
- labelname: virtualDiskNumber
type: gauge
dlink:
walk:
- 1.3.6.1.4.1.171.12.1.1.6
- 1.3.6.1.4.1.171.12.1.1.9
metrics:
- name: agentCPUutilizationIn5sec
oid: 1.3.6.1.4.1.171.12.1.1.6.1
type: gauge
help: The time scale is set at 5 second intervals - 1.3.6.1.4.1.171.12.1.1.6.1
- name: agentCPUutilizationIn1min
oid: 1.3.6.1.4.1.171.12.1.1.6.2
type: gauge
help: The time scale is set at 1 minute intervals - 1.3.6.1.4.1.171.12.1.1.6.2
- name: agentCPUutilizationIn5min
oid: 1.3.6.1.4.1.171.12.1.1.6.3
type: gauge
help: The time scale is set at 5 minute intervals - 1.3.6.1.4.1.171.12.1.1.6.3
- name: agentDRAMutilizationTotalDRAM
oid: 1.3.6.1.4.1.171.12.1.1.9.1.2
type: gauge
help: The size of total DRAM memory. - 1.3.6.1.4.1.171.12.1.1.9.1.2
indexes:
- labelname: agentDRAMutilizationUnitID
type: gauge
- name: agentDRAMutilizationUsedDRAM
oid: 1.3.6.1.4.1.171.12.1.1.9.1.3
type: gauge
help: The size of used DRAM memory. - 1.3.6.1.4.1.171.12.1.1.9.1.3
indexes:
- labelname: agentDRAMutilizationUnitID
type: gauge
- name: agentDRAMutilization
oid: 1.3.6.1.4.1.171.12.1.1.9.1.4
type: gauge
help: The percentage of used DRAM memory of the total DRAM memory available
- 1.3.6.1.4.1.171.12.1.1.9.1.4
indexes:
- labelname: agentDRAMutilizationUnitID
type: gauge
eap:
get:
- 1.3.6.1.4.1.11863.10.1.1.1.0
Expand All @@ -13035,6 +13074,29 @@ modules:
oid: 1.3.6.1.4.1.11863.10.1.1.1
type: gauge
help: this used to get the count of clients - 1.3.6.1.4.1.11863.10.1.1.1
eltex_mes:
get:
- 1.3.6.1.4.1.2076.81.1.73.0
- 1.3.6.1.4.1.35265.1.139.6.1.1.2.1.0
- 1.3.6.1.4.1.35265.1.139.6.1.1.2.2.0
- 1.3.6.1.4.1.35265.1.139.6.1.1.2.3.0
metrics:
- name: issSwitchCurrentRAMUsage
oid: 1.3.6.1.4.1.2076.81.1.73
type: gauge
help: Indicates the current RAM usage of the switch in percentage - 1.3.6.1.4.1.2076.81.1.73
- name: eltMesIssCpuUtilLast5Seconds
oid: 1.3.6.1.4.1.35265.1.139.6.1.1.2.1
type: gauge
help: Percentage of the device CPU utilization during last 5 seconds - 1.3.6.1.4.1.35265.1.139.6.1.1.2.1
- name: eltMesIssCpuUtilLastMinute
oid: 1.3.6.1.4.1.35265.1.139.6.1.1.2.2
type: gauge
help: Percentage of the device CPU utilization during last minute - 1.3.6.1.4.1.35265.1.139.6.1.1.2.2
- name: eltMesIssCpuUtilLast5Minutes
oid: 1.3.6.1.4.1.35265.1.139.6.1.1.2.3
type: gauge
help: Percentage of the device CPU utilization during the last 5 minutes - 1.3.6.1.4.1.35265.1.139.6.1.1.2.3
hpe:
walk:
- 1.3.6.1.4.1.232.1.2.2.1.1
Expand Down Expand Up @@ -42757,6 +42819,40 @@ modules:
oid: 1.3.6.1.4.1.41112.1.4.9.9
type: DisplayString
help: GPS Horizontal Dilution of Precision - 1.3.6.1.4.1.41112.1.4.9.9
ubiquiti_airos:
walk:
- 1.3.6.1.4.1.10002.1.1.1.1
- 1.3.6.1.4.1.10002.1.1.1.4.2
metrics:
- name: memTotal
oid: 1.3.6.1.4.1.10002.1.1.1.1.1
type: gauge
help: Total usable physical memory (in KB) - 1.3.6.1.4.1.10002.1.1.1.1.1
- name: memFree
oid: 1.3.6.1.4.1.10002.1.1.1.1.2
type: gauge
help: Available physical memory (in KB) - 1.3.6.1.4.1.10002.1.1.1.1.2
- name: memBuffer
oid: 1.3.6.1.4.1.10002.1.1.1.1.3
type: gauge
help: Physical memory used by buffers (in KB) - 1.3.6.1.4.1.10002.1.1.1.1.3
- name: memCache
oid: 1.3.6.1.4.1.10002.1.1.1.1.4
type: gauge
help: Physical memory used for caching (in KB) - 1.3.6.1.4.1.10002.1.1.1.1.4
- name: loadValue
oid: 1.3.6.1.4.1.10002.1.1.1.4.2.1.3
type: gauge
help: The 1,5 and 10 minute load averages - 1.3.6.1.4.1.10002.1.1.1.4.2.1.3
indexes:
- labelname: loadIndex
type: gauge
lookups:
- labels:
- loadIndex
labelname: loadDescr
oid: 1.3.6.1.4.1.10002.1.1.1.4.2.1.2
type: DisplayString
ubiquiti_unifi:
walk:
- 1.3.6.1.4.1.41112.1.6
Expand Down