{"id":291151,"date":"2018-10-22T12:00:04","date_gmt":"2018-10-22T08:00:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=291151"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=291151","title":{"rendered":"SNMP + Java \u2013 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e: \u043f\u0438\u0448\u0435\u043c \u043f\u0430\u0440\u0441\u0435\u0440 MIB-\u0444\u0430\u0439\u043b\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">SNMP \u2013 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u044e\u0437\u0435\u0440-\u0444\u0440\u0435\u043d\u0434\u043b\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b: MIB-\u0444\u0430\u0439\u043b\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0435, \u0430 OID&#8217;\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 SNMP \u043d\u0430 Java? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 API SNMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>  \u041f\u0443\u0442\u0451\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u043c\u0435 \u043c\u044b \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c Java \u0438 SNMP.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432 \u0441\u0435\u0440\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 MIB-\u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 Java. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 SNMP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0412 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0430\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SNMP.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tv\/lq\/ai\/tvlqaihbpnaqtlie8wr7hulxyhg.jpeg\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u0443\u0434\u0438\u043e-\u0432\u0438\u0434\u0435\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SNMP. \u041e\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u043e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0442\u043e, \u0447\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u0441 SNMP \u043d\u0430 Java \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043c\u043d\u043e\u0433\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 C# \u0438\u043b\u0438 Python. \u041d\u043e \u0432 C# \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043a\u0430\u043a \u0438 \u0432 Java. \u0412 \u043f\u0438\u0442\u043e\u043d\u0435 \u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u043e \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432 REST API \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 Java.<\/p>\n<p>  \u041a\u0430\u043a \u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u0441\u0435\u0442\u0438, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b SNMP-\u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0438\u0434\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0410\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0443\u043c\u0435\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c GET- \u0438 SET-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u0438 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0414\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 MIB-\u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c MIB-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u0440\u0430\u043d\u0438\u0446 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0442.\u0434., \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f Java \u043c\u044b \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u0438 \u0441 MIB-\u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445. \u0414\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u044b\u0431\u043e\u0440 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 org.snmp4j.snmp4j (https:\/\/www.snmp4j.org), \u0430 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430 MIB-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 net.percederberg.mibble (https:\/\/www.mibble.org). \u0415\u0441\u043b\u0438 \u0441 snmp4j \u0432\u044b\u0431\u043e\u0440 \u0431\u044b\u043b \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d, \u0442\u043e mibble \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0437\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 (\u0445\u043e\u0442\u044c \u0438 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439) \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438. \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<h2>\u041f\u0438\u0448\u0435\u043c \u043f\u0430\u0440\u0441\u0435\u0440 MIB-\u0444\u0430\u0439\u043b\u043e\u0432<\/h2>\n<p>  \u0412\u0441\u0435, \u043a\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0432\u0438\u0434\u0435\u043b MIB-\u0444\u0430\u0439\u043b\u044b, \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u043e\u043b\u044c. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442 \u043f\u043e\u0438\u0441\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u0441\u0432\u0435\u0434\u044f \u0435\u0433\u043e \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 MIB-\u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434 SNMP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 SNMP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Maven. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 net.percederberg.mibble (https:\/\/www.mibble.org), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442 \u043d\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 MIB-\u0444\u0430\u0439\u043b\u0430\u043c\u0438:<\/p>\n<pre><code class=\"xml\">&lt;dependency&gt;     &lt;groupId&gt;net.percederberg.mibble&lt;\/groupId&gt;     &lt;artifactId&gt;mibble&lt;\/artifactId&gt;     &lt;version&gt;2.9.3&lt;\/version&gt; &lt;\/dependency&gt; <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043b\u0435\u0436\u0438\u0442 \u043d\u0435 \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Maven, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 pom.xml \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;repositories&gt;     &lt;repository&gt;         &lt;id&gt;opennms&lt;\/id&gt;         &lt;name&gt;OpenNMS&lt;\/name&gt;         &lt;url&gt;http:\/\/repo.opennms.org\/maven2\/&lt;\/url&gt;     &lt;\/repository&gt; &lt;\/repositories&gt; <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0432\u0435\u043d\u0430 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 (\u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0433\u043e MIBParser) \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<pre><code class=\"java\">import net.percederberg.mibble.*;<\/code><\/pre>\n<p>  <\/p>\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f MIB-\u0444\u0430\u0439\u043b\u0430<\/h4>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 \u2013 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 net.percederberg.mibble.Mib \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e MIB-\u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code class=\"java\"> private Mib mib; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u043f\u0438\u0448\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"java\"> private Mib loadMib(File file) throws MibLoaderException, IOException {     MibLoader loader = new MibLoader();     Mib mib;     file = file.getAbsoluteFile();     try {         loader.addDir(file.getParentFile());         mib = loader.load(file);     } catch (MibLoaderException e) {         e.getLog().printTo(System.err);         throw e;     } catch (IOException e) {         e.printStackTrace();         throw e;     }     return mib; } <\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 net.percederberg.mibble.MIBLoader \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438 \u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 net.percederberg.mibble.MibLoaderException \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0451\u0442 \u0432 \u043d\u0451\u043c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 MIB-\u0444\u0430\u0439\u043b\u043e\u0432, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 MIB-\u0441\u0438\u043c\u0432\u043e\u043b\u044b.<\/p>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 loadMib \u043b\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043f\u0438\u0448\u0435\u043c \u043e \u043d\u0438\u0445 \u0432 \u043b\u043e\u0433 \u0438 \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u0442.\u043a. \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u2013 \u0444\u0430\u0439\u043b \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439.<\/p>\n<p>  \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u0430:<\/p>\n<pre><code class=\"java\"> public MIBParser(File file) throws MibLoaderException, IOException {     if (!file.exists())         throw new FileNotFoundException(&quot;File not found in location: &quot; + file.getAbsolutePath());     mib = loadMib(file.getAbsoluteFile());     if (!mib.isLoaded())         throw new MibLoaderException(file, &quot;Not loaded.&quot;); } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u0438 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u043b\u0441\u044f, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<h4>\u041c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 MIB-\u0444\u0430\u0439\u043b\u0430<\/h4>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 net.percederberg.mibble.Mib \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b MIB-\u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 OID \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 getSymbol(String name) \u0438\u043b\u0438 getSymbolByOid(String oid) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u042d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 net.percederberg.mibble.MibSymbol, \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 MIB-\u0441\u0438\u043c\u0432\u043e\u043b\u0443.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u043e \u0435\u0433\u043e OID \u0438, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, OID \u043f\u043e \u0438\u043c\u0435\u043d\u0438:<\/p>\n<pre><code class=\"java\"> public String getName(String oid) {     return mib.getSymbolByOid(oid).getName(); }  public String getOid(String name) {     String oid = null;     MibSymbol s = mib.getSymbol(name);      if (s instanceof MibValueSymbol) {         oid = ((MibValueSymbol) s).getValue().toString();         if (((MibValueSymbol) s).isScalar())             oid = new OID(oid).append(0).toDottedString();     }     return oid; } <\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e MIB-\u0444\u0430\u0439\u043b\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0434\u043b\u044f \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f OID \u0431\u0435\u0437 \u043d\u0443\u043b\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f OID\u2019\u0430 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 MIB-\u0441\u0438\u043c\u0432\u043e\u043b \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0439, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c\u0443 OID \u00ab.0\u00bb \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 append(int\u00a0index) \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 net.percederberg.mibble.OID. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043a\u043e\u0441\u0442\u044b\u043b\u044f, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \ud83d\ude42<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u043f\u0438\u0448\u0435\u043c \u043e\u0434\u0438\u043d \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0433\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 net.percederberg.mibble.snmp.SnmpObjectType, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c MIB-\u0441\u0438\u043c\u0432\u043e\u043b\u0435, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0435\u043d.<\/p>\n<pre><code class=\"java\"> private SnmpObjectType getSnmpObjectType(MibSymbol symbol) {     if (symbol instanceof MibValueSymbol) {         MibType type = ((MibValueSymbol) symbol).getType();         if (type instanceof SnmpObjectType) {             return (SnmpObjectType) type;         }     }     return null; } <\/code><\/pre>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0438\u043f MIB-\u0441\u0438\u043c\u0432\u043e\u043b\u0430:<\/p>\n<pre><code class=\"java\"> public String getType(String name) {     MibSymbol s = mib.getSymbol(name);     if (getSnmpObjectType(s).getSyntax().getReferenceSymbol() == null)         return getSnmpObjectType(s).getSyntax().getName();     else         return getSnmpObjectType(s).getSyntax().getReferenceSymbol().getName(); } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430, \u0442.\u043a. \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"java\"> getSnmpObjectType(s).getSyntax().getName(); <\/code><\/pre>\n<p>  \u0430 \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u2013 \u0432\u0442\u043e\u0440\u043e\u0439:<\/p>\n<pre><code class=\"java\"> getSnmpObjectType(s).getSyntax().getReferenceSymbol().getName(); <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0443:<\/p>\n<pre><code class=\"java\"> public String getAccess(String name) {     MibSymbol s = mib.getSymbol(name);     return getSnmpObjectType(s).getAccess().toString(); } <\/code><\/pre>\n<p>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"java\"> public Integer getDigitMinValue(String name) {     MibSymbol s = mib.getSymbol(name);     String syntax = getSnmpObjectType(s).getSyntax().toString();     if (syntax.contains(&quot;STRING&quot;))         return null;     Pattern p = Pattern.compile(&quot;(-?\\\\d+)..(-?\\\\d+)&quot;);     Matcher m = p.matcher(syntax);     if (m.find()) {         return Integer.parseInt(m.group(1));     }     return null; } <\/code><\/pre>\n<p>  \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"java\"> public Integer getDigitMaxValue(String name) {     MibSymbol s = mib.getSymbol(name);     String syntax = getSnmpObjectType(s).getSyntax().toString();     if (syntax.contains(&quot;STRING&quot;))         return null;     Pattern p = Pattern.compile(&quot;(-?\\\\d+)..(-?\\\\d+)&quot;);     Matcher m = p.matcher(syntax);     if (m.find()) {         return Integer.parseInt(m.group(2));     }     return null; } <\/code><\/pre>\n<p>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0441\u0442\u0440\u043e\u043a\u0438):<\/p>\n<pre><code class=\"java\"> public Integer getStringMinLength(String name) {     MibSymbol s = this.mib.getSymbol(name);     String syntax = this.getSnmpObjectType(s).getSyntax().toString();     Pattern p = Pattern.compile(&quot;(-?\\\\d+)..(-?\\\\d+)&quot;);     Matcher m = p.matcher(syntax);     return syntax.contains(&quot;STRING&quot;) && m.find()?Integer.valueOf(Integer.parseInt(m.group(1))):null; } <\/code><\/pre>\n<p>  \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0441\u0442\u0440\u043e\u043a\u0438):<\/p>\n<pre><code class=\"java\"> public Integer getStringMaxLength(String name) {     MibSymbol s = mib.getSymbol(name);     String syntax = getSnmpObjectType(s).getSyntax().toString();     Pattern p = Pattern.compile(&quot;(-?\\\\d+)..(-?\\\\d+)&quot;);     Matcher m = p.matcher(syntax);     if (syntax.contains(&quot;STRING&quot;) && m.find()) {         return Integer.parseInt(m.group(2));     }     return null; } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0435\u0451 \u0438\u043c\u0435\u043d\u0438:<\/p>\n<pre><code class=\"java\"> public ArrayList&lt;String&gt; getTableColumnNames(String tableName) {     ArrayList&lt;String&gt; mibSymbolNamesList = new ArrayList&lt;&gt;();     MibValueSymbol table = (MibValueSymbol) mib.findSymbol(tableName, true);     if (table.isTable() && table.getChild(0).isTableRow()) {         MibValueSymbol[] symbols = table.getChild(0).getChildren();         for (MibValueSymbol mvs : symbols) {             mibSymbolNamesList.add(mvs.getName());         }     }     return mibSymbolNamesList; } <\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c MIB-\u0441\u0438\u043c\u0432\u043e\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438:<\/p>\n<pre><code class=\"java\"> MibValueSymbol table = (MibValueSymbol) mib.findSymbol(tableName, true); <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0438 \u0447\u0442\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 MIB-\u0441\u0438\u043c\u0432\u043e\u043b \u2013 \u0441\u0442\u0440\u043e\u043a\u0430 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438, \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true, \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438\u0434\u0451\u043c \u043f\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre><code class=\"java\"> if (table.isTable() && table.getChild(0).isTableRow()) {     MibValueSymbol[] symbols = table.getChild(0).getChildren();     for (MibValueSymbol mvs : symbols) {         mibSymbolNamesList.add(mvs.getName());     } } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>  \u042d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 MIB-\u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443, \u0437\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0438\u043c\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 SNMP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0438 \u043d\u0435 OID\u2019\u044b, \u0430 \u0438\u043c\u0435\u043d\u0430 MIB-\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u042d\u0442\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u0442.\u043a. \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 OID\u2019\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043d\u0435 \u043a \u0442\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f. \u0410 \u043d\u0435\u0442 OID\u2019\u043e\u0432 \u2013 \u043d\u0435\u0442 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. <\/p>\n<p>  \u0412 \u043f\u043b\u044e\u0441 \u0438\u0434\u0451\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c. \u041f\u0440\u043e\u0449\u0435 \u0432\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432 \u0441\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437 MIB-\u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a, \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u0441\u044f \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e MIB-\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u0412 \u0446\u0435\u043b\u043e\u043c, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 MIB-\u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435, \u0438 \u043e\u043d\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0443\u0436 \u0431\u043e\u043b\u044c\u044e.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/427267\/\"> https:\/\/habr.com\/post\/427267\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">SNMP \u2013 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u044e\u0437\u0435\u0440-\u0444\u0440\u0435\u043d\u0434\u043b\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b: MIB-\u0444\u0430\u0439\u043b\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0435, \u0430 OID&#8217;\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 SNMP \u043d\u0430 Java? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 API SNMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>  \u041f\u0443\u0442\u0451\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u043c\u0435 \u043c\u044b \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c Java \u0438 SNMP.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432 \u0441\u0435\u0440\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 MIB-\u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 Java. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 SNMP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0412 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0430\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SNMP.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tv\/lq\/ai\/tvlqaihbpnaqtlie8wr7hulxyhg.jpeg\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-291151","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291151"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291151\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}