MIBファイルの定義間違い

snmpのverによっても解釈違うのかもしれないけど
メーカー純正 MIBファイルで OBJECT Errorとかホント勘弁してほしい _no

ちなみに
Ruckus Standalone_AP_MIBs_for_release_100.1.0.0.432.zip

環境的には
CentOS7の環境に Zabbix & snmpが導入されている
(今回Verは関係ないので未記載)

/usr/share/snmp/mibs に 標準mibが格納されており
/usr/share/snmp/private-mibs を作成し、Yamahaから Ciscoから色々放り込んだ状況で
RUCKUSのmibを追加

/etc/snmp/snmp.confを

# cat /etc/snmp/snmp.conf
MIBDIRS /usr/share/snmp/mibs:/usr/share/snmp/private-mibs
MIBS all

こんな感じで新規作成してある

余談だが
最初 /usr/share/snmp/mibs の下に private とディレクトリ切ってみたが
読み込んでくれなかった
どうやら指定ディレクトリ直下しか舐めにいかない仕様のようで

そもそも
YAMAHA RTのsnmpを確認しようとコマンドを実行した所

# snmptranslate -On YAMAHA-RT-INTERFACES::yrIfPpInUtil
Did not find 'ruckusCommonDHCPModule' in module RUCKUS-ROOT-MIB (/usr/share/snmp/private-mibs/RUCKUS-DHCP-MIB.txt)
Unlinked OID in RUCKUS-DHCP-MIB: ruckusDHCPMIB ::= { ruckusCommonDHCPModule 1 }
Undefined identifier: ruckusCommonDHCPModule near line 23 of /usr/share/snmp/private-mibs/RUCKUS-DHCP-MIB.txt
Expected "(" (_): At line 363 in /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt
Should be ACCESS (VLAN-ID): At line 363 in /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt
Bad parse of OBJECT-TYPE: At line 363 in /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientExternalRenew ::= { ruckusDHCPClientExternal 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientExternal ::= { ruckusDHCPObjects 2 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientInfo ::= { ruckusDHCPObjects 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientEntry ::= { ruckusDHCPClientTable 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPMIB ::= { ruckusCommonDHCPModule 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientTable ::= { ruckusDHCPClientInfo 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientLeaseTime ::= { ruckusDHCPClientEntry 4 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientSubnetMask ::= { ruckusDHCPClientEntry 3 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientIPAddress ::= { ruckusDHCPClientEntry 2 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientHWAddress ::= { ruckusDHCPClientEntry 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientEvents ::= { ruckusDHCPMIB 2 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPObjects ::= { ruckusDHCPMIB 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientExternalRenew ::= { ruckusDHCPClientExternal 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientInfo ::= { ruckusDHCPObjects 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientExternal ::= { ruckusDHCPObjects 2 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientEntry ::= { ruckusDHCPClientTable 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPMIB ::= { ruckusCommonDHCPModule 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientTable ::= { ruckusDHCPClientInfo 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientHWAddress ::= { ruckusDHCPClientEntry 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientIPAddress ::= { ruckusDHCPClientEntry 2 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientSubnetMask ::= { ruckusDHCPClientEntry 3 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientLeaseTime ::= { ruckusDHCPClientEntry 4 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPObjects ::= { ruckusDHCPMIB 1 }
Cannot adopt OID in RUCKUS-DHCP-MIB: ruckusDHCPClientEvents ::= { ruckusDHCPMIB 2 }
.1.3.6.1.4.1.1182.2.3.9.1.25

こんな感じにエラーを出力

エラーメッセージどおりに RUCKUS-ROOT-MIB を確認すると
ruckusCommonDHCPModule OBJECT IDENTIFIER ::= { ruckusCommon 7 }
コメントアウトされていたので修正

# diff -u /usr/share/snmp/private-mibs/RUCKUS-ROOT-MIB.txt /tmp/mibs/RUCKUS-ROOT-MIB.txt
--- /usr/share/snmp/private-mibs/RUCKUS-ROOT-MIB.txt    2019-04-09 05:09:41.443429407 +0900
+++ /tmp/mibs/RUCKUS-ROOT-MIB.txt       2015-07-21 00:49:52.000000000 +0900
@@ -48,7 +48,7 @@

 ruckusCommonWLANModule OBJECT IDENTIFIER    ::= { ruckusCommon 6 }

-ruckusCommonDHCPModule OBJECT IDENTIFIER    ::= { ruckusCommon 7 }
+-- ruckusCommonDHCPModule OBJECT IDENTIFIER    ::= { ruckusCommon 7 }

 ruckusCommonPPPOEModule OBJECT IDENTIFIER   ::= { ruckusCommon 8 }

次にコマンドを実行すると

# snmptranslate -On YAMAHA-RT-INTERFACES::yrIfPpInUtil
Expected "(" (_): At line 363 in /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt
Should be ACCESS (VLAN-ID): At line 363 in /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt
Bad parse of OBJECT-TYPE: At line 363 in /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt
.1.3.6.1.4.1.1182.2.3.9.1.25

今度はMIBファイルの "_" がオカシイと言われたので確認

# diff -u /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt /tmp/mibs/RUCKUS-WLAN-MIB.txt
--- /usr/share/snmp/private-mibs/RUCKUS-WLAN-MIB.txt    2019-04-09 05:06:45.132691458 +0900
+++ /tmp/mibs/RUCKUS-WLAN-MIB.txt       2015-07-21 00:49:52.000000000 +0900
@@ -360,7 +360,7 @@
     ::= { ruckusWLANEntry 50 }

 ruckusWLANOption82Subopt1 OBJECT-TYPE
-    SYNTAX INTEGER {IF-Name-VLAN-ID-ESSID-AP-Model-AP-Name-AP-MAC(1),
+    SYNTAX INTEGER {IF-Name_VLAN-ID_ESSID_AP-Model_AP-Name_AP-MAC(1),
                        AP-MAC-hex(2),
                        AP-MAC-hex-ESSID(3),
                        ESSID(4)}
@@ -376,9 +376,9 @@

 ruckusWLANOption82Subopt2 OBJECT-TYPE
     SYNTAX INTEGER {Client-MAC-hex(1),
-                       Client-MAC-hex-ESSID(2),
+                       Client-MAC-hex_ESSID(2),
                        AP-MAC-hex(3),
-                       AP-MAC-hex-ESSID(4),
+                       AP-MAC-hex_ESSID(4),
                        AP-MAC(5)}
     MAX-ACCESS read-write
     STATUS current

合計3カ所の "_"を修正しました _no