...
코드 블럭 |
---|
language | bash |
---|
linenumbers | true |
---|
|
# apt -y install snmp-mibs-downloader
# tree -F /usr/share/snmp/mibs/
/usr/share/snmp/mibs/
├── iana -> /var/lib/mibs/iana/
├── ietf -> /var/lib/mibs/ietf/
├── NET-SNMP-AGENT-MIB.txt
...
2 directories, 13 files
# tree -F /var/lib/mibs/iana/
/var/lib/mibs/iana/
├── IANAifType-MIB
├── IANA-ITU-ALARM-TC-MIB
...
0 directories, 15 files
# tree -F /var/lib/mibs/ietf/
├── IP-MIB
├── IPV6-FLOW-LABEL-MIB
├── RFC1213-MIB
├── VRRP-MIB
├── WWW-MIB
...
0 directories, 300 files |
코드 블럭 |
---|
language | bash |
---|
linenumbers | true |
---|
|
# mkdir -p ~/.snmp
# git clone --depth=1 https://github.com/librenms/librenms
# mv librenms/mibs ~/.snmp/
# tree -F ~/.snmp/mibs/
$HOME/.snmp/mibs/
├── cisco/
│ ├── CISCO-ENTITY-SENSOR-MIB
│ ├── CISCO-RTTMON-ICMP-MIB
│ ...
│
├── dasan/
│ ├── DASAN-ACCESS-MIB
│ ...
│
├── dell/
│ ├── DELL-NETWORKING-SMI
│ ├── DELL-NETWORKING-SYSLOG-MIB
│ ...
├──
├── SNMPv2-SMI
├── SNMPv2-SMI-v1
├── SNMPv2-TC
├── SNMPv2-TC-v1
...
338 directories, 4573 files |
MIB search path
코드 블럭 |
---|
language | bash |
---|
linenumbers | true |
---|
|
# O=1.3.6.1.4.1.9.9.513.1.1.1.1.5
# M=~/.snmp/mibs/dell:~/.snmp/mibs/cisco
# snmptranslate -Tz -M +$M -m ALL $O
MIB search path: ~/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:~/.snmp/mibs/dell:~/.snmp/mibs/cisco
CISCO-LWAPP-AP-MIB::cLApName |
...
코드 블럭 |
---|
language | bash |
---|
linenumbers | true |
---|
|
# cat /etc/snmp/snmp.conf | grep mibdirs
# mibdirs /usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf |
...
DIR_LIST 안에서 검색 가능한 지정한 MIB 만을 참조, ALL 하면 모든 MIB 참조