Skip to main content

SNMP MIB

net-snmp-config --default-mibdirs
mkdir -p ~/.snmp/mibs
# --create-dirs
curl --output-dir ~/.snmp/mibs -O ftp://ftp.cisco.com/pub/mibs/v2/CISCO-SMI.my
curl --output-dir ~/.snmp/mibs -O ftp://ftp.cisco.com/pub/mibs/v2/CISCO-RHINO-MIB.my

snmptranslate -m +CISCO-RHINO-MIB -IR -On ciscoLS1010ChassisFanLed
snmptranslate -On CISCO-RHINO-MIB::ciscoLS1010ChassisFanLed

# mibs +ALL
cat <<CONF >> $HOME/.snmp/snmp.conf
mibs +CISCO-RHINO-MIB
CONF

# env
MIBS=+CISCO-RHINO-MIB:SOME-OTHER-SPIFFY-MIB
export MIBS

General

Printer

HOST-RESOURCES-MIB

snmpwalk -Os -c public -v 2c 192.168.1.1 host
# 或
snmpwalk -Os -c public -v 2c 192.168.1.1 1.3.6.1.2.1.25

UCD-SNMP-MIB

nameoiddesc
UCD-SNMP-MIB::laLoad.11.3.6.1.4.1.2021.10.1.3.11min load
UCD-SNMP-MIB::laLoad.21.3.6.1.4.1.2021.10.1.3.25min load
UCD-SNMP-MIB::laLoad.31.3.6.1.4.1.2021.10.1.3.315min load

UBNT

caution
  • 开启 高性能设备 选项会导致 unifiVapNumStations 错误计数
    • 仅将高性能客户端连接到 5G
    • unifiVapNumStations.0 和 unifiVapNumStations.1 返回相同数值 - guest 和 user
curl --output-dir ~/.snmp/mibs -O http://dl.ubnt-ut.com/snmp/UBNT-MIB
curl --output-dir ~/.snmp/mibs -O http://dl.ubnt-ut.com/snmp/UBNT-UniFi-MIB

snmpwalk -v 2c -c public -m +UBNT-UniFi-MIB 192.168.1.1 1.3.6.1.4.1.41112.1.6
unifiVapEssId * on(unifiVapIndex) group_right(unifiVapEssId) (unifiVapRadio * on(unifiVapIndex) group_right(unifiVapRadio) unifiVapNumStations)

unifiVapEssId{instance="$instance"} * on(unifiVapIndex) group_right(unifiVapEssId) (unifiVapRadio{instance="$instance"} * on(unifiVapIndex) group_right(unifiVapRadio) unifiVapNumStations{instance="$instance"})