cp /etc/snmp/snmp.conf ~
Override conf:
mkdir -p /usr/share/snmp/mibs/mikrotik
echo "bWlicyA6Cm1pYmRpcnMgL3Vzci9zaGFyZS9zbm1wL21pYnMvbWlrcm90aWsKbWlicyArQUxMCg==" | base64 --decode > /etc/snmp/snmp.conf
cat /etc/snmp/snmp.conf
mibs :
mibdirs /usr/share/snmp/mibs/mikrotik
mibs +ALL
Install jq utility on debian:apt -y install jq
For RHEL family and Ubuntu:curl -sL "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" -o /usr/bin/jq && chmod +x /usr/bin/jq
Move to directory where all mibs is havin' a good time:
cd /usr/share/snmp/mibs/mikrotik
Install MIBs:
curl -s "http://download2.mikrotik.com/Mikrotik.mib" > Mikrotik.txt
#Cannot find module (SNMPv2-TC): At line 6 in Mikrotik.txt
#Cannot find module (SNMPv2-TC): At line 9 in IF-MIB
#Cannot find module (SNMPv2-TC): At line 8 in HOST-RESOURCES-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/6256431306427085217?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > SNMPv2-TC
#Cannot find module (SNMPv2-MIB): At line 12 in IF-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/8525717342803436063?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > SNMPv2-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/5277416913785380744?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > SNMPv2-SMI
#Cannot find module (IANAifType-MIB): At line 13 in IF-MIB
#Cannot find module (IANAifType-MIB): At line 31 in RFC1213-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/676592785645707688?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > IANAifType-MIB
#1.3.6.1.2.1.4 = RFC1213-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/6373935412447458318?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > RFC1213-MIB
#1.3.6.1.2.1.24 = IP-FORWARD-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/340755601049378588?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > IP-FORWARD-MIB
#Cannot find module (IANA-RTPROTO-MIB): At line 14 in IP-FORWARD-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/4724469402540268296?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > IANA-RTPROTO-MIB
#Cannot find module (SNMPv2-TC): At line 7 in IP-FORWARD-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/6256431306427085217?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > SNMPv2-TC
#Cannot find module (IP-MIB): At line 13 in IP-FORWARD-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/7442134025866260159?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > IP-MIB
#Cannot find module (IF-MIB): At line 16 in IP-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/91346405589059276?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > IF-MIB
#Cannot find module (IANA-RTPROTO-MIB): At line 14 in IP-FORWARD-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/4724469402540268296?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > IANA-RTPROTO-MIB
#1.3.6.1.2.1.17 = BRIDGE-MIB
#Cannot find module (SNMPv2-TC): At line 23 in BRIDGE-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/6922734783513926068?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > BRIDGE-MIB
#1.3.6.1.2.1.25 = HOST-RESOURCES-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/2108177056477787942?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > HOST-RESOURCES-MIB
#1.3.6.1.2.1.47 = ENTITY-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/4778758141428031910?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > ENTITY-MIB
#Cannot find module (SNMP-FRAMEWORK-MIB): At line 26 in ENTITY-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/5655215877528198528?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > SNMP-FRAMEWORK-MIB
#Cannot find module (INET-ADDRESS-MIB): At line 17 in IP-FORWARD-MIB
curl -s "https://catonrug.blogspot.com/feeds/posts/default/2474015602827470154?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > INET-ADDRESS-MIB
#1.3.6.1.2.1.9999
curl -s "https://catonrug.blogspot.com/feeds/posts/default/4006681332172387686?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > DOCS-IETF-BPI2-MIB
#1.3.6.1.2.1.9999.1.1.6
#curl -s "https://catonrug.blogspot.com/feeds/posts/default/4334206497178459648?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > CISCO-IETF-DHCP-SERVER-MIB
#Cannot find module (CISCO-SMI): At line 65 in CISCO-IETF-DHCP-SERVER-MIB
#curl -s "https://catonrug.blogspot.com/feeds/posts/default/6547144618793662137?alt=json" | jq -r '.entry|.content|."$t"' | base64 --decode > CISCO-SMI
#not found
Test:
snmpwalk -v2c -cpublic 192.168.88.1 -OfT