logstash-input-snmp 0.1.0.beta4 → 0.1.0.beta5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/logstash/inputs/snmp.rb +75 -12
  4. data/lib/logstash/inputs/snmp/base_client.rb +162 -0
  5. data/lib/logstash/inputs/snmp/client.rb +11 -109
  6. data/lib/logstash/inputs/snmp/clientv3.rb +139 -0
  7. data/lib/logstash/inputs/snmp/mib.rb +22 -20
  8. data/lib/mibs/ietf/ACCOUNTING-CONTROL-MIB.dic +1316 -0
  9. data/lib/mibs/ietf/ADSL-LINE-EXT-MIB.dic +1724 -0
  10. data/lib/mibs/ietf/ADSL-LINE-MIB.dic +7297 -0
  11. data/lib/mibs/ietf/ADSL-TC-MIB.dic +160 -0
  12. data/lib/mibs/ietf/ADSL2-LINE-MIB.dic +8663 -0
  13. data/lib/mibs/ietf/ADSL2-LINE-TC-MIB.dic +1462 -0
  14. data/lib/mibs/ietf/AGENTX-MIB.dic +817 -0
  15. data/lib/mibs/ietf/AGGREGATE-MIB.dic +708 -0
  16. data/lib/mibs/ietf/ALARM-MIB.dic +1734 -0
  17. data/lib/mibs/ietf/APM-MIB.dic +2870 -0
  18. data/lib/mibs/ietf/APPC-MIB.dic +8687 -0
  19. data/lib/mibs/ietf/APPLETALK-MIB.dic +4399 -0
  20. data/lib/mibs/ietf/APPLICATION-MIB.dic +3750 -0
  21. data/lib/mibs/ietf/APPN-DLUR-MIB.dic +972 -0
  22. data/lib/mibs/ietf/APPN-MIB.dic +9364 -0
  23. data/lib/mibs/ietf/APPN-TRAP-MIB.dic +664 -0
  24. data/lib/mibs/ietf/APS-MIB.dic +2430 -0
  25. data/lib/mibs/ietf/ARC-MIB.dic +552 -0
  26. data/lib/mibs/ietf/ATM-ACCOUNTING-INFORMATION-MIB.dic +816 -0
  27. data/lib/mibs/ietf/ATM-MIB.dic +4104 -0
  28. data/lib/mibs/ietf/ATM-TC-MIB.dic +914 -0
  29. data/lib/mibs/ietf/ATM2-MIB.dic +4715 -0
  30. data/lib/mibs/ietf/BFD-STD-MIB.dic +2367 -0
  31. data/lib/mibs/ietf/BFD-TC-STD-MIB.dic +202 -0
  32. data/lib/mibs/ietf/BGP4-MIB.dic +1931 -0
  33. data/lib/mibs/ietf/BLDG-HVAC-MIB.dic +812 -0
  34. data/lib/mibs/ietf/BRIDGE-MIB.dic +2257 -0
  35. data/lib/mibs/ietf/CAPWAP-BASE-MIB.dic +4128 -0
  36. data/lib/mibs/ietf/CAPWAP-DOT11-MIB.dic +482 -0
  37. data/lib/mibs/ietf/CHARACTER-MIB.dic +1140 -0
  38. data/lib/mibs/ietf/CIRCUIT-IF-MIB.dic +493 -0
  39. data/lib/mibs/ietf/CLNS-MIB.dic +1702 -0
  40. data/lib/mibs/ietf/COFFEE-POT-MIB.dic +282 -0
  41. data/lib/mibs/ietf/COPS-CLIENT-MIB.dic +1270 -0
  42. data/lib/mibs/ietf/DECNET-PHIV-MIB.dic +5837 -0
  43. data/lib/mibs/ietf/DIAL-CONTROL-MIB.dic +2139 -0
  44. data/lib/mibs/ietf/DIFFSERV-CONFIG-MIB.dic +378 -0
  45. data/lib/mibs/ietf/DIFFSERV-MIB.dic +5073 -0
  46. data/lib/mibs/ietf/DIRECTORY-SERVER-MIB.dic +1041 -0
  47. data/lib/mibs/ietf/DISMAN-EVENT-MIB.dic +3151 -0
  48. data/lib/mibs/ietf/DISMAN-EXPRESSION-MIB.dic +1716 -0
  49. data/lib/mibs/ietf/DISMAN-NSLOOKUP-MIB.dic +698 -0
  50. data/lib/mibs/ietf/DISMAN-PING-MIB.dic +2635 -0
  51. data/lib/mibs/ietf/DISMAN-SCHEDULE-MIB.dic +1744 -0
  52. data/lib/mibs/ietf/DISMAN-SCRIPT-MIB.dic +2820 -0
  53. data/lib/mibs/ietf/DISMAN-TRACEROUTE-MIB.dic +3239 -0
  54. data/lib/mibs/ietf/DLSW-MIB.dic +5635 -0
  55. data/lib/mibs/ietf/DNS-RESOLVER-MIB.dic +1765 -0
  56. data/lib/mibs/ietf/DNS-SERVER-MIB.dic +1593 -0
  57. data/lib/mibs/ietf/DOCS-BPI-MIB.dic +2634 -0
  58. data/lib/mibs/ietf/DOCS-CABLE-DEVICE-MIB.dic +5042 -0
  59. data/lib/mibs/ietf/DOCS-IETF-BPI2-MIB.dic +5478 -0
  60. data/lib/mibs/ietf/DOCS-IETF-CABLE-DEVICE-NOTIFICATION-MIB.dic +2447 -0
  61. data/lib/mibs/ietf/DOCS-IETF-QOS-MIB.dic +4886 -0
  62. data/lib/mibs/ietf/DOCS-IETF-SUBMGT-MIB.dic +1331 -0
  63. data/lib/mibs/ietf/DOCS-IF-MIB.dic +7980 -0
  64. data/lib/mibs/ietf/DOT12-IF-MIB.dic +1066 -0
  65. data/lib/mibs/ietf/DOT12-RPTR-MIB.dic +2669 -0
  66. data/lib/mibs/ietf/DOT3-EPON-MIB.dic +3297 -0
  67. data/lib/mibs/ietf/DOT3-OAM-MIB.dic +2830 -0
  68. data/lib/mibs/ietf/DS0-MIB.dic +466 -0
  69. data/lib/mibs/ietf/DS0BUNDLE-MIB.dic +468 -0
  70. data/lib/mibs/ietf/DS1-MIB.dic +4890 -0
  71. data/lib/mibs/ietf/DS3-MIB.dic +2719 -0
  72. data/lib/mibs/ietf/DSA-MIB.dic +888 -0
  73. data/lib/mibs/ietf/DSMON-MIB.dic +6177 -0
  74. data/lib/mibs/ietf/DVB-RCS-MIB.dic +5764 -0
  75. data/lib/mibs/ietf/EBN-MIB.dic +1026 -0
  76. data/lib/mibs/ietf/EFM-CU-MIB.dic +4335 -0
  77. data/lib/mibs/ietf/ENTITY-MIB.dic +2235 -0
  78. data/lib/mibs/ietf/ENTITY-SENSOR-MIB.dic +653 -0
  79. data/lib/mibs/ietf/ENTITY-STATE-MIB.dic +457 -0
  80. data/lib/mibs/ietf/ENTITY-STATE-TC-MIB.dic +260 -0
  81. data/lib/mibs/ietf/ETHER-CHIPSET-MIB.dic +787 -0
  82. data/lib/mibs/ietf/EtherLike-MIB.dic +2548 -0
  83. data/lib/mibs/ietf/FC-MGMT-MIB.dic +3465 -0
  84. data/lib/mibs/ietf/FCIP-MGMT-MIB.dic +1596 -0
  85. data/lib/mibs/ietf/FDDI-SMT73-MIB.dic +3378 -0
  86. data/lib/mibs/ietf/FIBRE-CHANNEL-FE-MIB.dic +2504 -0
  87. data/lib/mibs/ietf/FLOAT-TC-MIB.dic +128 -0
  88. data/lib/mibs/ietf/FLOW-METER-MIB.dic +3201 -0
  89. data/lib/mibs/ietf/FORCES-MIB.dic +598 -0
  90. data/lib/mibs/ietf/FR-ATM-PVC-SERVICE-IWF-MIB.dic +1601 -0
  91. data/lib/mibs/ietf/FR-MFR-MIB.dic +1351 -0
  92. data/lib/mibs/ietf/FRAME-RELAY-DTE-MIB.dic +1688 -0
  93. data/lib/mibs/ietf/FRNETSERV-MIB.dic +3940 -0
  94. data/lib/mibs/ietf/FRSLD-MIB.dic +2580 -0
  95. data/lib/mibs/ietf/Finisher-MIB.dic +1416 -0
  96. data/lib/mibs/ietf/GMPLS-LABEL-STD-MIB.dic +965 -0
  97. data/lib/mibs/ietf/GMPLS-LSR-STD-MIB.dic +693 -0
  98. data/lib/mibs/ietf/GMPLS-TC-STD-MIB.dic +180 -0
  99. data/lib/mibs/ietf/GMPLS-TE-STD-MIB.dic +2542 -0
  100. data/lib/mibs/ietf/GSMP-MIB.dic +2468 -0
  101. data/lib/mibs/ietf/HC-ALARM-MIB.dic +1050 -0
  102. data/lib/mibs/ietf/HC-PerfHist-TC-MIB.dic +310 -0
  103. data/lib/mibs/ietf/HC-RMON-MIB.dic +4456 -0
  104. data/lib/mibs/ietf/HDSL2-SHDSL-LINE-MIB.dic +3955 -0
  105. data/lib/mibs/ietf/HOST-RESOURCES-MIB.dic +2453 -0
  106. data/lib/mibs/ietf/HPR-IP-MIB.dic +640 -0
  107. data/lib/mibs/ietf/HPR-MIB.dic +1959 -0
  108. data/lib/mibs/ietf/IANA-ITU-ALARM-TC-MIB.dic +936 -0
  109. data/lib/mibs/ietf/IF-CAP-STACK-MIB.dic +356 -0
  110. data/lib/mibs/ietf/IF-INVERTED-STACK-MIB.dic +220 -0
  111. data/lib/mibs/ietf/IF-MIB.dic +2753 -0
  112. data/lib/mibs/ietf/IFCP-MGMT-MIB.dic +1717 -0
  113. data/lib/mibs/ietf/IGMP-STD-MIB.dic +809 -0
  114. data/lib/mibs/ietf/INET-ADDRESS-MIB.dic +570 -0
  115. data/lib/mibs/ietf/INTEGRATED-SERVICES-GUARANTEED-MIB.dic +319 -0
  116. data/lib/mibs/ietf/INTEGRATED-SERVICES-MIB.dic +1196 -0
  117. data/lib/mibs/ietf/INTERFACETOPN-MIB.dic +1705 -0
  118. data/lib/mibs/ietf/IP-FORWARD-MIB.dic +1853 -0
  119. data/lib/mibs/ietf/IP-MIB.dic +7064 -0
  120. data/lib/mibs/ietf/IPATM-IPMC-MIB.dic +4830 -0
  121. data/lib/mibs/ietf/IPFIX-MIB.dic +2334 -0
  122. data/lib/mibs/ietf/IPFIX-SELECTOR-MIB.dic +215 -0
  123. data/lib/mibs/ietf/IPMCAST-MIB.dic +3390 -0
  124. data/lib/mibs/ietf/IPMROUTE-STD-MIB.dic +1246 -0
  125. data/lib/mibs/ietf/IPOA-MIB.dic +2372 -0
  126. data/lib/mibs/ietf/IPS-AUTH-MIB.dic +1609 -0
  127. data/lib/mibs/ietf/IPSEC-SPD-MIB.dic +3989 -0
  128. data/lib/mibs/ietf/IPV6-FLOW-LABEL-MIB.dic +110 -0
  129. data/lib/mibs/ietf/IPV6-ICMP-MIB.dic +748 -0
  130. data/lib/mibs/ietf/IPV6-MIB.dic +2028 -0
  131. data/lib/mibs/ietf/IPV6-MLD-MIB.dic +659 -0
  132. data/lib/mibs/ietf/IPV6-TCP-MIB.dic +332 -0
  133. data/lib/mibs/ietf/IPV6-UDP-MIB.dic +209 -0
  134. data/lib/mibs/ietf/ISCSI-MIB.dic +4613 -0
  135. data/lib/mibs/ietf/ISDN-MIB.dic +1796 -0
  136. data/lib/mibs/ietf/ISIS-MIB.dic +6215 -0
  137. data/lib/mibs/ietf/ISNS-MIB.dic +6578 -0
  138. data/lib/mibs/ietf/ITU-ALARM-MIB.dic +665 -0
  139. data/lib/mibs/ietf/ITU-ALARM-TC-MIB.dic +137 -0
  140. data/lib/mibs/ietf/Job-Monitoring-MIB.dic +2519 -0
  141. data/lib/mibs/ietf/L2TP-MIB.dic +4050 -0
  142. data/lib/mibs/ietf/LANGTAG-TC-MIB.dic +104 -0
  143. data/lib/mibs/ietf/LISP-MIB.dic +4067 -0
  144. data/lib/mibs/ietf/LMP-MIB.dic +5166 -0
  145. data/lib/mibs/ietf/MALLOC-MIB.dic +2156 -0
  146. data/lib/mibs/ietf/MAU-MIB.dic +2619 -0
  147. data/lib/mibs/ietf/MIDCOM-MIB.dic +2856 -0
  148. data/lib/mibs/ietf/MIOX25-MIB.dic +828 -0
  149. data/lib/mibs/ietf/MIP-MIB.dic +3473 -0
  150. data/lib/mibs/ietf/MOBILEIPV6-MIB.dic +5228 -0
  151. data/lib/mibs/ietf/MPLS-FTN-STD-MIB.dic +1594 -0
  152. data/lib/mibs/ietf/MPLS-L3VPN-STD-MIB.dic +2548 -0
  153. data/lib/mibs/ietf/MPLS-LC-ATM-STD-MIB.dic +491 -0
  154. data/lib/mibs/ietf/MPLS-LC-FR-STD-MIB.dic +395 -0
  155. data/lib/mibs/ietf/MPLS-LDP-ATM-STD-MIB.dic +1019 -0
  156. data/lib/mibs/ietf/MPLS-LDP-FRAME-RELAY-STD-MIB.dic +862 -0
  157. data/lib/mibs/ietf/MPLS-LDP-GENERIC-STD-MIB.dic +445 -0
  158. data/lib/mibs/ietf/MPLS-LDP-STD-MIB.dic +3657 -0
  159. data/lib/mibs/ietf/MPLS-LSR-STD-MIB.dic +3103 -0
  160. data/lib/mibs/ietf/MPLS-TC-STD-MIB.dic +911 -0
  161. data/lib/mibs/ietf/MPLS-TE-STD-MIB.dic +3673 -0
  162. data/lib/mibs/ietf/MSDP-MIB.dic +1893 -0
  163. data/lib/mibs/ietf/MTA-MIB.dic +1898 -0
  164. data/lib/mibs/ietf/Modem-MIB.dic +2054 -0
  165. data/lib/mibs/ietf/NAT-MIB.dic +3866 -0
  166. data/lib/mibs/ietf/NETWORK-SERVICES-MIB.dic +1034 -0
  167. data/lib/mibs/ietf/NHDP-MIB.dic +3005 -0
  168. data/lib/mibs/ietf/NHRP-MIB.dic +3660 -0
  169. data/lib/mibs/ietf/NOTIFICATION-LOG-MIB.dic +1156 -0
  170. data/lib/mibs/ietf/NTPv4-MIB.dic +1535 -0
  171. data/lib/mibs/ietf/OPT-IF-MIB.dic +8972 -0
  172. data/lib/mibs/ietf/OSPF-MIB.dic +5963 -0
  173. data/lib/mibs/ietf/OSPF-TRAP-MIB.dic +1190 -0
  174. data/lib/mibs/ietf/OSPFV3-MIB.dic +5708 -0
  175. data/lib/mibs/ietf/P-BRIDGE-MIB.dic +1499 -0
  176. data/lib/mibs/ietf/PARALLEL-MIB.dic +476 -0
  177. data/lib/mibs/ietf/PIM-MIB.dic +1393 -0
  178. data/lib/mibs/ietf/PIM-STD-MIB.dic +6819 -0
  179. data/lib/mibs/ietf/PINT-MIB.dic +830 -0
  180. data/lib/mibs/ietf/PKTC-IETF-MTA-MIB.dic +3191 -0
  181. data/lib/mibs/ietf/PKTC-IETF-SIG-MIB.dic +4713 -0
  182. data/lib/mibs/ietf/PMIPV6-MIB.dic +3010 -0
  183. data/lib/mibs/ietf/PMIPV6-TC-MIB.dic +293 -0
  184. data/lib/mibs/ietf/POLICY-BASED-MANAGEMENT-MIB.dic +3316 -0
  185. data/lib/mibs/ietf/POWER-ETHERNET-MIB.dic +959 -0
  186. data/lib/mibs/ietf/PPP-BRIDGE-NCP-MIB.dic +587 -0
  187. data/lib/mibs/ietf/PPP-IP-NCP-MIB.dic +269 -0
  188. data/lib/mibs/ietf/PPP-LCP-MIB.dic +994 -0
  189. data/lib/mibs/ietf/PPP-SEC-MIB.dic +411 -0
  190. data/lib/mibs/ietf/PSAMP-MIB.dic +998 -0
  191. data/lib/mibs/ietf/PTOPO-MIB.dic +1135 -0
  192. data/lib/mibs/ietf/PW-ATM-MIB.dic +1642 -0
  193. data/lib/mibs/ietf/PW-CEP-STD-MIB.dic +3661 -0
  194. data/lib/mibs/ietf/PW-STD-MIB.dic +3592 -0
  195. data/lib/mibs/ietf/PW-TC-STD-MIB.dic +437 -0
  196. data/lib/mibs/ietf/PW-TDM-MIB.dic +1896 -0
  197. data/lib/mibs/ietf/PerfHist-TC-MIB.dic +152 -0
  198. data/lib/mibs/ietf/Printer-MIB.dic +6665 -0
  199. data/lib/mibs/ietf/Q-BRIDGE-MIB.dic +3115 -0
  200. data/lib/mibs/ietf/RADIUS-ACC-CLIENT-MIB.dic +991 -0
  201. data/lib/mibs/ietf/RADIUS-ACC-SERVER-MIB.dic +1183 -0
  202. data/lib/mibs/ietf/RADIUS-AUTH-CLIENT-MIB.dic +1073 -0
  203. data/lib/mibs/ietf/RADIUS-AUTH-SERVER-MIB.dic +1251 -0
  204. data/lib/mibs/ietf/RADIUS-DYNAUTH-CLIENT-MIB.dic +1116 -0
  205. data/lib/mibs/ietf/RADIUS-DYNAUTH-SERVER-MIB.dic +1003 -0
  206. data/lib/mibs/ietf/RAQMON-MIB.dic +2695 -0
  207. data/lib/mibs/ietf/RBRIDGE-MIB.dic +2981 -0
  208. data/lib/mibs/ietf/RDBMS-MIB.dic +1935 -0
  209. data/lib/mibs/ietf/RFC1065-SMI.dic +108 -0
  210. data/lib/mibs/ietf/RFC1155-SMI.dic +118 -0
  211. data/lib/mibs/ietf/RFC1158-MIB.dic +2440 -0
  212. data/lib/mibs/ietf/RFC1213-MIB.dic +3434 -0
  213. data/lib/mibs/ietf/RFC1269-MIB.dic +557 -0
  214. data/lib/mibs/ietf/RFC1271-MIB.dic +4135 -0
  215. data/lib/mibs/ietf/RFC1285-MIB.dic +2842 -0
  216. data/lib/mibs/ietf/RFC1316-MIB.dic +800 -0
  217. data/lib/mibs/ietf/RFC1381-MIB.dic +1347 -0
  218. data/lib/mibs/ietf/RFC1382-MIB.dic +3820 -0
  219. data/lib/mibs/ietf/RFC1414-MIB.dic +214 -0
  220. data/lib/mibs/ietf/RIPv2-MIB.dic +773 -0
  221. data/lib/mibs/ietf/RMON-MIB.dic +5551 -0
  222. data/lib/mibs/ietf/RMON2-MIB.dic +8224 -0
  223. data/lib/mibs/ietf/ROHC-MIB.dic +1613 -0
  224. data/lib/mibs/ietf/ROHC-RTP-MIB.dic +859 -0
  225. data/lib/mibs/ietf/ROHC-UNCOMPRESSED-MIB.dic +267 -0
  226. data/lib/mibs/ietf/RPKI-ROUTER-MIB.dic +1363 -0
  227. data/lib/mibs/ietf/RS-232-MIB.dic +1335 -0
  228. data/lib/mibs/ietf/RSERPOOL-MIB.dic +2501 -0
  229. data/lib/mibs/ietf/RSTP-MIB.dic +427 -0
  230. data/lib/mibs/ietf/RSVP-MIB.dic +4135 -0
  231. data/lib/mibs/ietf/RTP-MIB.dic +1376 -0
  232. data/lib/mibs/ietf/SCSI-MIB.dic +3804 -0
  233. data/lib/mibs/ietf/SCTP-MIB.dic +1924 -0
  234. data/lib/mibs/ietf/SFLOW-MIB.dic +568 -0
  235. data/lib/mibs/ietf/SIP-COMMON-MIB.dic +2769 -0
  236. data/lib/mibs/ietf/SIP-MIB.dic +1438 -0
  237. data/lib/mibs/ietf/SIP-SERVER-MIB.dic +1150 -0
  238. data/lib/mibs/ietf/SIP-TC-MIB.dic +257 -0
  239. data/lib/mibs/ietf/SIP-UA-MIB.dic +268 -0
  240. data/lib/mibs/ietf/SLAPM-MIB.dic +4527 -0
  241. data/lib/mibs/ietf/SMON-MIB.dic +1758 -0
  242. data/lib/mibs/ietf/SNA-NAU-MIB.dic +4042 -0
  243. data/lib/mibs/ietf/SNA-SDLC-MIB.dic +3858 -0
  244. data/lib/mibs/ietf/SNMP-COMMUNITY-MIB.dic +715 -0
  245. data/lib/mibs/ietf/SNMP-FRAMEWORK-MIB.dic +709 -0
  246. data/lib/mibs/ietf/SNMP-MPD-MIB.dic +230 -0
  247. data/lib/mibs/ietf/SNMP-NOTIFICATION-MIB.dic +859 -0
  248. data/lib/mibs/ietf/SNMP-PROXY-MIB.dic +414 -0
  249. data/lib/mibs/ietf/SNMP-REPEATER-MIB.dic +4335 -0
  250. data/lib/mibs/ietf/SNMP-SSH-TM-MIB.dic +447 -0
  251. data/lib/mibs/ietf/SNMP-TARGET-MIB.dic +924 -0
  252. data/lib/mibs/ietf/SNMP-TLS-TM-MIB.dic +1449 -0
  253. data/lib/mibs/ietf/SNMP-TSM-MIB.dic +315 -0
  254. data/lib/mibs/ietf/SNMP-USER-BASED-SM-MIB.dic +1164 -0
  255. data/lib/mibs/ietf/SNMP-USM-AES-MIB.dic +95 -0
  256. data/lib/mibs/ietf/SNMP-USM-DH-OBJECTS-MIB.dic +653 -0
  257. data/lib/mibs/ietf/SNMP-VIEW-BASED-ACM-MIB.dic +1202 -0
  258. data/lib/mibs/ietf/SNMPv2-MIB.dic +1382 -0
  259. data/lib/mibs/ietf/SNMPv2-SMI.dic +223 -0
  260. data/lib/mibs/ietf/SNMPv2-USEC-MIB.dic +405 -0
  261. data/lib/mibs/ietf/SONET-MIB.dic +3308 -0
  262. data/lib/mibs/ietf/SOURCE-ROUTING-MIB.dic +542 -0
  263. data/lib/mibs/ietf/SSPM-MIB.dic +1530 -0
  264. data/lib/mibs/ietf/SYSAPPL-MIB.dic +2092 -0
  265. data/lib/mibs/ietf/T11-FC-FABRIC-ADDR-MGR-MIB.dic +1779 -0
  266. data/lib/mibs/ietf/T11-FC-FABRIC-CONFIG-SERVER-MIB.dic +2822 -0
  267. data/lib/mibs/ietf/T11-FC-FABRIC-LOCK-MIB.dic +700 -0
  268. data/lib/mibs/ietf/T11-FC-FSPF-MIB.dic +1889 -0
  269. data/lib/mibs/ietf/T11-FC-NAME-SERVER-MIB.dic +1775 -0
  270. data/lib/mibs/ietf/T11-FC-ROUTE-MIB.dic +655 -0
  271. data/lib/mibs/ietf/T11-FC-RSCN-MIB.dic +1110 -0
  272. data/lib/mibs/ietf/T11-FC-VIRTUAL-FABRIC-MIB.dic +770 -0
  273. data/lib/mibs/ietf/T11-FC-ZONE-SERVER-MIB.dic +3886 -0
  274. data/lib/mibs/ietf/T11-TC-MIB.dic +110 -0
  275. data/lib/mibs/ietf/TCP-ESTATS-MIB.dic +3926 -0
  276. data/lib/mibs/ietf/TCP-MIB.dic +1319 -0
  277. data/lib/mibs/ietf/TCPIPX-MIB.dic +457 -0
  278. data/lib/mibs/ietf/TE-LINK-STD-MIB.dic +2876 -0
  279. data/lib/mibs/ietf/TE-MIB.dic +2924 -0
  280. data/lib/mibs/ietf/TED-MIB.dic +1749 -0
  281. data/lib/mibs/ietf/TIME-AGGREGATE-MIB.dic +550 -0
  282. data/lib/mibs/ietf/TN3270E-MIB.dic +2785 -0
  283. data/lib/mibs/ietf/TN3270E-RT-MIB.dic +1317 -0
  284. data/lib/mibs/ietf/TOKEN-RING-RMON-MIB.dic +2820 -0
  285. data/lib/mibs/ietf/TOKENRING-MIB.dic +1184 -0
  286. data/lib/mibs/ietf/TOKENRING-STATION-SR-MIB.dic +292 -0
  287. data/lib/mibs/ietf/TRANSPORT-ADDRESS-MIB.dic +610 -0
  288. data/lib/mibs/ietf/TRIP-MIB.dic +3159 -0
  289. data/lib/mibs/ietf/TRIP-TC-MIB.dic +241 -0
  290. data/lib/mibs/ietf/TUNNEL-MIB.dic +1095 -0
  291. data/lib/mibs/ietf/UDP-MIB.dic +751 -0
  292. data/lib/mibs/ietf/UDPLITE-MIB.dic +704 -0
  293. data/lib/mibs/ietf/UPS-MIB.dic +3088 -0
  294. data/lib/mibs/ietf/URI-TC-MIB.dic +193 -0
  295. data/lib/mibs/ietf/UUID-TC-MIB.dic +135 -0
  296. data/lib/mibs/ietf/VDSL-LINE-EXT-MCM-MIB.dic +989 -0
  297. data/lib/mibs/ietf/VDSL-LINE-EXT-SCM-MIB.dic +605 -0
  298. data/lib/mibs/ietf/VDSL-LINE-MIB.dic +4518 -0
  299. data/lib/mibs/ietf/VDSL2-LINE-MIB.dic +11029 -0
  300. data/lib/mibs/ietf/VDSL2-LINE-TC-MIB.dic +3152 -0
  301. data/lib/mibs/ietf/VPN-TC-STD-MIB.dic +121 -0
  302. data/lib/mibs/ietf/VRRP-MIB.dic +1163 -0
  303. data/lib/mibs/ietf/VRRPV3-MIB.dic +1403 -0
  304. data/lib/mibs/ietf/WWW-MIB.dic +1810 -0
  305. data/lib/mibs/logstash/iso.dic +18 -0
  306. data/logstash-input-snmp.gemspec +1 -1
  307. data/spec/inputs/snmp/mib_spec.rb +10 -17
  308. data/spec/inputs/snmp_spec.rb +27 -1
  309. metadata +302 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47e2417cd4748a579620be35c59d571e7a503a334c10d74fd3744c33432bd262
4
- data.tar.gz: f625f7821f9470bf97da4d527c3f729fcd809e6d0367aba899c9168d0ac33315
3
+ metadata.gz: eb2edaea9339e4955345a99d3a7c36c3c11eb907d91ee91c7aadb9110a68c215
4
+ data.tar.gz: bcd78c64a492e9025f277a5139d7517d75e52aa741f8c7314b4b9c51c0285879
5
5
  SHA512:
6
- metadata.gz: d708cb916fed7cc63dec16a548067e26edc4437feacdf7dd906d9289dc460c91e7333fe3f747d6de6613e2c586973001714404b06f6e5e7d9c8ca95c395a3ce2
7
- data.tar.gz: 7463c5d563036eeafbcc0ea038d777b56f4e544575bf0d1a76cafef395605626357b1f975376838f27f7b3faa995f0974044d22cc229766fd2415eea6cce6206
6
+ metadata.gz: 4e6d4213da72a049d9d8f02a3e2ea9e6a93915746595bd14cb5e4c7115f74d549f97c069698090d89fc80a29095f4b399e05362e7449d2c84543cb7be0016d17
7
+ data.tar.gz: 50441d39a18880a799cbf444af8ddf424d7c348b9f6ef162af195cd221310008b90f5bf58805fdabeea33f21fb33deafd557f64390383a84b175480e90a69017
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.0.beta5
2
+ - Added OPAQUE type coercion [#29](https://github.com/logstash-plugins/logstash-input-snmp/pull/29)
3
+ - Added SNMPv3 support [#27](https://github.com/logstash-plugins/logstash-input-snmp/pull/27)
4
+ - Added support for provided MIBs [#25](https://github.com/logstash-plugins/logstash-input-snmp/pull/25)
5
+
1
6
  ## 0.1.0.beta4
2
7
  - Fixed missing coercions [#12](https://github.com/logstash-plugins/logstash-input-snmp/pull/12)
3
8
 
@@ -4,6 +4,7 @@ require "logstash/namespace"
4
4
  require "stud/interval"
5
5
  require "socket" # for Socket.gethostname
6
6
  require_relative "snmp/client"
7
+ require_relative "snmp/clientv3"
7
8
  require_relative "snmp/mib"
8
9
 
9
10
  # Generate a repeating message.
@@ -26,11 +27,15 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
26
27
  # for example `host => "udp:127.0.0.1/161"`
27
28
  # Each host definition can optionally include the following keys and values:
28
29
  # `community` with a default value of `public`
29
- # `version` `1` or `2c` with a default value of `2c`
30
- # `retries` with a detault value of `2`
30
+ # `version` `1`, `2c` or `3` with a default value of `2c`
31
+ # `retries` with a default value of `2`
31
32
  # `timeout` in milliseconds with a default value of `1000`
32
33
  config :hosts, :validate => :array #[ {"host" => "udp:127.0.0.1/161", "community" => "public"} ]
33
34
 
35
+ # This plugin provides sets of MIBs publicly available. The full paths to these provided MIBs paths
36
+ # Will be displayed at plugin startup.
37
+ config :use_provided_mibs, :validate => :boolean, :default => true
38
+
34
39
  # List of paths of MIB .dic files of dirs. If a dir path is specified, all files with .dic extension will be loaded.
35
40
  #
36
41
  # ATTENTION: a MIB .dic file must be generated using the libsmi library `smidump` command line utility
@@ -50,28 +55,65 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
50
55
 
51
56
  # Set polling interval in seconds
52
57
  #
53
- # The default, `30`, means poll each host every 30second.
58
+ # The default, `30`, means poll each host every 30 seconds.
54
59
  config :interval, :validate => :number, :default => 30
55
60
 
56
61
  # Add the default "host" field to the event.
57
62
  config :add_field, :validate => :hash, :default => { "host" => "%{[@metadata][host_address]}" }
58
63
 
64
+ # SNMPv3 Credentials
65
+ #
66
+ # A single user can be configured and will be used for all defined SNMPv3 hosts.
67
+ # Multiple snmp input declarations will be needed if multiple SNMPv3 users are required.
68
+ # If not using SNMPv3 simply leave options empty.
69
+
70
+ # The SNMPv3 security name or user name
71
+ config :security_name, :validate => :string
72
+
73
+ # The SNMPv3 authentication protocol or type
74
+ config :auth_protocol, :validate => ["md5", "sha", "sha2", "hmac128sha224", "hmac192sha256", "hmac256sha384", "hmac384sha512"]
75
+
76
+ # The SNMPv3 authentication passphrase or password
77
+ config :auth_pass, :validate => :password
78
+
79
+ # The SNMPv3 privacy/encryption protocol
80
+ config :priv_protocol, :validate => ["des", "3des", "aes", "aes128", "aes192", "aes256"]
81
+
82
+ # The SNMPv3 encryption password
83
+ config :priv_pass, :validate => :password
84
+
85
+ # The SNMPv3 security level can be Authentication, No Privacy; Authentication, Privacy; or no Authentication, no Privacy
86
+ config :security_level, :validate => ["noAuthNoPriv", "authNoPriv", "authPriv"]
87
+
88
+ BASE_MIB_PATH = ::File.join(__FILE__, "..", "..", "..", "mibs")
89
+ PROVIDED_MIB_PATHS = [::File.join(BASE_MIB_PATH, "logstash"), ::File.join(BASE_MIB_PATH, "ietf")].map { |path| ::File.expand_path(path) }
90
+
59
91
  def register
60
92
  validate_oids!
61
93
  validate_hosts!
62
94
 
63
95
  mib = LogStash::SnmpMib.new
96
+
97
+ if @use_provided_mibs
98
+ PROVIDED_MIB_PATHS.each do |path|
99
+ logger.info("using plugin provided MIB path #{path}")
100
+ mib.add_mib_path(path)
101
+ end
102
+ end
103
+
64
104
  Array(@mib_paths).each do |path|
65
- # TODO handle errors
105
+ logger.info("using user provided MIB path #{path}")
66
106
  mib.add_mib_path(path)
67
107
  end
68
108
 
109
+ # setup client definitions per provided host
110
+
69
111
  @client_definitions = []
70
112
  @hosts.each do |host|
71
113
  host_name = host["host"]
72
114
  community = host["community"] || "public"
73
115
  version = host["version"] || "2c"
74
- raise(LogStash::ConfigurationError, "only protocol version '1' and '2c' are supported for host option '#{host_name}'") unless version =~ VERSION_REGEX
116
+ raise(LogStash::ConfigurationError, "only protocol version '1', '2c' and '3' are supported for host option '#{host_name}'") unless version =~ VERSION_REGEX
75
117
 
76
118
  retries = host["retries"] || 2
77
119
  timeout = host["timeout"] || 1000
@@ -86,7 +128,6 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
86
128
  port = host_details[:host_port]
87
129
 
88
130
  definition = {
89
- :client => LogStash::SnmpClient.new(protocol, address, port, community, version, retries, timeout, mib),
90
131
  :get => Array(get),
91
132
  :walk => Array(walk),
92
133
 
@@ -95,6 +136,15 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
95
136
  :host_port => port,
96
137
  :host_community => community,
97
138
  }
139
+
140
+ if version == "3"
141
+ validate_v3_user! # don't really care if verified for every host
142
+ auth_pass = @auth_pass.nil? ? nil : @auth_pass.value
143
+ priv_pass = @priv_pass.nil? ? nil : @priv_pass.value
144
+ definition[:client] = LogStash::SnmpClientV3.new(protocol, address, port, retries, timeout, mib, @security_name, @auth_protocol, auth_pass, @priv_protocol, priv_pass, @security_level)
145
+ else
146
+ definition[:client] = LogStash::SnmpClient.new(protocol, address, port, community, version, retries, timeout, mib)
147
+ end
98
148
  @client_definitions << definition
99
149
  end
100
150
  end
@@ -109,7 +159,7 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
109
159
  begin
110
160
  result = result.merge(definition[:client].get(definition[:get], @oid_root_skip))
111
161
  rescue => e
112
- logger.error("error invoking get operation on OIDs: #{definition[:get]}, ignoring", :exception => e, :backtrace => e.backtrace)
162
+ logger.error("error invoking get operation on #{definition[:host_address]} for OIDs: #{definition[:get]}, ignoring", :exception => e, :backtrace => e.backtrace)
113
163
  end
114
164
  end
115
165
  if !definition[:walk].empty?
@@ -124,10 +174,10 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
124
174
 
125
175
  unless result.empty?
126
176
  metadata = {
127
- "host_protocol" => definition[:host_protocol],
128
- "host_address" => definition[:host_address],
129
- "host_port" => definition[:host_port],
130
- "host_community" => definition[:host_community],
177
+ "host_protocol" => definition[:host_protocol],
178
+ "host_address" => definition[:host_address],
179
+ "host_port" => definition[:host_port],
180
+ "host_community" => definition[:host_community],
131
181
  }
132
182
  result["@metadata"] = metadata
133
183
 
@@ -148,7 +198,7 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
148
198
 
149
199
  OID_REGEX = /^\.?([0-9\.]+)$/
150
200
  HOST_REGEX = /^(?<host_protocol>udp|tcp):(?<host_address>.+)\/(?<host_port>\d+)$/i
151
- VERSION_REGEX =/^1|2c$/
201
+ VERSION_REGEX =/^1|2c|3$/
152
202
 
153
203
  def validate_oids!
154
204
  @get = Array(@get).map do |oid|
@@ -170,6 +220,19 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
170
220
  raise(LogStash::ConfigurationError, "at least one get OID or one walk OID is required") if @get.empty? && @walk.empty?
171
221
  end
172
222
 
223
+ def validate_v3_user!
224
+ errors = []
225
+
226
+ errors << "v3 user must have a \"security_name\" option" if @security_name.nil?
227
+ errors << "you must specify an auth protocol if you specify an auth pass" if @auth_protocol.nil? && !@auth_pass.nil?
228
+ errors << "you must specify an auth pass if you specify an auth protocol" if !@auth_protocol.nil? && @auth_pass.nil?
229
+ errors << "you must specify a priv protocol if you specify a priv pass" if @priv_protocol.nil? && !@priv_pass.nil?
230
+ errors << "you must specify a priv pass if you specify a priv protocol" if !@priv_protocol.nil? && @priv_pass.nil?
231
+
232
+ raise(LogStash::ConfigurationError, errors.join(", ")) unless errors.empty?
233
+ end
234
+
235
+
173
236
  def validate_hosts!
174
237
  # TODO: for new we only validate the host part, not the other optional options
175
238
 
@@ -0,0 +1,162 @@
1
+ require "java"
2
+ require "logstash-input-snmp_jars.rb"
3
+
4
+ java_import "org.snmp4j.CommunityTarget"
5
+ java_import "org.snmp4j.PDU"
6
+ java_import "org.snmp4j.ScopedPDU"
7
+ java_import "org.snmp4j.Snmp"
8
+ java_import "org.snmp4j.Target"
9
+ java_import "org.snmp4j.TransportMapping"
10
+ java_import "org.snmp4j.event.ResponseEvent"
11
+ java_import "org.snmp4j.mp.SnmpConstants"
12
+ java_import "org.snmp4j.smi.Address"
13
+ java_import "org.snmp4j.smi.GenericAddress"
14
+ java_import "org.snmp4j.smi.OID"
15
+ java_import "org.snmp4j.smi.OctetString"
16
+ java_import "org.snmp4j.smi.VariableBinding"
17
+ java_import "org.snmp4j.transport.DefaultUdpTransportMapping"
18
+ java_import "org.snmp4j.transport.DefaultTcpTransportMapping"
19
+ java_import "org.snmp4j.util.TreeUtils"
20
+ java_import "org.snmp4j.util.DefaultPDUFactory"
21
+ java_import "org.snmp4j.asn1.BER"
22
+
23
+ module LogStash
24
+ class SnmpClientError < StandardError
25
+ end
26
+
27
+ class BaseSnmpClient
28
+
29
+ def initialize(protocol, address, port, retries, timeout, mib)
30
+ transport = case protocol.to_s
31
+ when "udp"
32
+ DefaultUdpTransportMapping.new
33
+ when "tcp"
34
+ DefaultTcpTransportMapping.new
35
+ else
36
+ raise(SnmpClientError, "invalid transport protocol specified '#{protocol.to_s}', expecting 'udp' or 'tcp'")
37
+ end
38
+
39
+ @mib = mib
40
+ @snmp = Snmp.new(transport)
41
+ transport.listen()
42
+ end
43
+
44
+ def get(oids, strip_root = 0)
45
+ pdu = get_pdu
46
+ Array(oids).each { |oid| pdu.add(VariableBinding.new(OID.new(oid))) }
47
+
48
+ response_event = @snmp.send(pdu, @target, nil)
49
+ return nil if response_event.nil?
50
+
51
+ e = response_event.getError
52
+ raise(SnmpClientError, "error sending snmp get request: #{e.inspect}, #{e.getMessage}") if e
53
+
54
+ result = {}
55
+ response_pdu = response_event.getResponse
56
+ raise(SnmpClientError, "timeout sending snmp get request") if response_pdu.nil?
57
+
58
+ size = response_pdu.size
59
+ (0..size - 1).each do |i|
60
+ variable_binding = response_pdu.get(i)
61
+ oid = variable_binding.getOid.toString
62
+ variable = variable_binding.getVariable
63
+ value = coerce(variable)
64
+
65
+ result[@mib.map_oid(oid, strip_root)] = value
66
+ end
67
+
68
+ result
69
+ end
70
+
71
+
72
+ def walk(oid, strip_root = 0)
73
+ result = {}
74
+
75
+ pdufactory = get_pdu_factory
76
+ treeUtils = TreeUtils.new(@snmp, pdufactory)
77
+ events = treeUtils.getSubtree(@target, OID.new(oid))
78
+ return nil if events.nil? || events.size == 0
79
+
80
+ events.each do |event|
81
+ next if event.nil?
82
+
83
+ if event.isError
84
+ # TODO: see if we can salvage non errored event here
85
+ raise(SnmpClientError, "error sending snmp walk request: #{event.getErrorMessage}")
86
+ end
87
+
88
+ var_bindings = event.getVariableBindings
89
+ next if var_bindings.nil? || var_bindings.size == 0
90
+
91
+ var_bindings.each do |var_binding|
92
+ next if var_binding.nil?
93
+
94
+ oid = var_binding.getOid.toString
95
+ variable = var_binding.getVariable
96
+ value = coerce(variable)
97
+
98
+ result[@mib.map_oid(oid, strip_root)] = value
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ protected
106
+
107
+ NULL_STRING = "null".freeze
108
+
109
+ def coerce(variable)
110
+ variable_syntax = variable.getSyntax
111
+ # puts("variable.getSyntaxString=#{variable.getSyntaxString}")
112
+ case variable_syntax
113
+ when BER::OCTETSTRING, BER::BITSTRING
114
+ variable.toString
115
+ when BER::TIMETICKS, BER::COUNTER, BER::COUNTER32, BER::COUNTER64
116
+ variable.toLong
117
+ when BER::INTEGER, BER::INTEGER32, BER::GAUGE, BER::GAUGE32
118
+ variable.toInt
119
+ when BER::IPADDRESS
120
+ variable.toString
121
+ when BER::OID
122
+ variable.toString
123
+ when BER::NULL
124
+ NULL_STRING
125
+ when BER::OPAQUE
126
+ variable.toString
127
+ when BER::NOSUCHOBJECT
128
+ "Error: No Such Instance currently exists at this OID"
129
+ else
130
+ raise(SnmpClientError, "unknown variable syntax #{variable_syntax}, #{variable.getSyntaxString}")
131
+ end
132
+ end
133
+
134
+
135
+ def parse_version(version)
136
+ case version.to_s
137
+ when "3"
138
+ SnmpConstants.version3
139
+ when "2c"
140
+ SnmpConstants.version2c
141
+ when "1"
142
+ SnmpConstants.version1
143
+ else
144
+ raise(SnmpClientError, "protocol version '#{version}' is not supported, expected versions are '1', '2c' and '3'")
145
+ end
146
+ end
147
+
148
+ private
149
+
150
+ def get_pdu
151
+ raise("abstract method")
152
+ end
153
+
154
+ def get_pdu_factory
155
+ raise("abstract method")
156
+ end
157
+
158
+ def build_target(*args)
159
+ raise("abstract method")
160
+ end
161
+ end
162
+ end
@@ -1,8 +1,10 @@
1
1
  require "java"
2
2
  require "logstash-input-snmp_jars.rb"
3
+ require_relative "base_client"
3
4
 
4
5
  java_import "org.snmp4j.CommunityTarget"
5
6
  java_import "org.snmp4j.PDU"
7
+ java_import "org.snmp4j.ScopedPDU"
6
8
  java_import "org.snmp4j.Snmp"
7
9
  java_import "org.snmp4j.Target"
8
10
  java_import "org.snmp4j.TransportMapping"
@@ -20,113 +22,24 @@ java_import "org.snmp4j.util.DefaultPDUFactory"
20
22
  java_import "org.snmp4j.asn1.BER"
21
23
 
22
24
  module LogStash
23
- class SnmpClientError < StandardError
24
- end
25
-
26
- class SnmpClient
25
+ class SnmpClient < BaseSnmpClient
27
26
 
28
27
  def initialize(protocol, address, port, community, version, retries, timeout, mib)
29
- transport = case protocol.to_s
30
- when "udp"
31
- DefaultUdpTransportMapping.new
32
- when "tcp"
33
- DefaultTcpTransportMapping.new
34
- else
35
- raise(SnmpClientError, "invalid transport protocol specified '#{protocol.to_s}', expecting 'udp' or 'tcp'")
36
- end
37
-
28
+ super(protocol, address, port, retries, timeout, mib)
29
+ raise(SnmpClientError, "SnmpClient is expecting verison '1' or '2c'") unless ["1", "2c"].include?(version.to_s)
38
30
  @target = build_target("#{protocol}:#{address}/#{port}", community, version, retries, timeout)
39
- @mib = mib
40
-
41
- @snmp = Snmp.new(transport)
42
- transport.listen()
43
31
  end
44
32
 
45
- def get(oids, strip_root = 0)
33
+ private
34
+
35
+ def get_pdu
46
36
  pdu = PDU.new
47
- Array(oids).each { |oid| pdu.add(VariableBinding.new(OID.new(oid))) }
48
37
  pdu.setType(PDU::GET)
49
-
50
- response_event = @snmp.send(pdu, @target, nil)
51
- return nil if response_event.nil?
52
-
53
- e = response_event.getError
54
- raise(SnmpClientError, "error sending snmp get request: #{e.inspect}, #{e.getMessage}") if e
55
-
56
- result = {}
57
- response_pdu = response_event.getResponse
58
- raise(SnmpClientError, "timeout sending snmp get request") if response_pdu.nil?
59
-
60
- size = response_pdu.size
61
- (0..size - 1).each do |i|
62
- variable_binding = response_pdu.get(i)
63
- oid = variable_binding.getOid.toString
64
- variable = variable_binding.getVariable
65
- value = coerce(variable)
66
-
67
- result[@mib.map_oid(oid, strip_root)] = value
68
- end
69
-
70
- result
38
+ pdu
71
39
  end
72
40
 
73
-
74
- def walk(oid, strip_root = 0)
75
- result = {}
76
- treeUtils = TreeUtils.new(@snmp, DefaultPDUFactory.new)
77
- events = treeUtils.getSubtree(@target, OID.new(oid))
78
- return nil if events.nil? || events.size == 0
79
-
80
- events.each do |event|
81
- next if event.nil?
82
-
83
- if event.isError
84
- # TODO: see if we can salvage non errored event here
85
- raise(SnmpClientError, "error sending snmp walk request: #{event.getErrorMessage}")
86
- end
87
-
88
- var_bindings = event.getVariableBindings
89
- next if var_bindings.nil? || var_bindings.size == 0
90
-
91
- var_bindings.each do |var_binding|
92
- next if var_binding.nil?
93
-
94
- oid = var_binding.getOid.toString
95
- variable = var_binding.getVariable
96
- value = coerce(variable)
97
-
98
- result[@mib.map_oid(oid, strip_root)] = value
99
- end
100
- end
101
-
102
- result
103
- end
104
-
105
- private
106
-
107
- NULL_STRING = "null".freeze
108
-
109
- def coerce(variable)
110
- variable_syntax = variable.getSyntax
111
- # puts("variable.getSyntaxString=#{variable.getSyntaxString}")
112
- case variable_syntax
113
- when BER::OCTETSTRING, BER::BITSTRING
114
- variable.toString
115
- when BER::TIMETICKS, BER::COUNTER, BER::COUNTER32, BER::COUNTER64
116
- variable.toLong
117
- when BER::INTEGER, BER::INTEGER32, BER::GAUGE, BER::GAUGE32
118
- variable.toInt
119
- when BER::IPADDRESS
120
- variable.toString
121
- when BER::OID
122
- variable.toString
123
- when BER::NULL
124
- NULL_STRING
125
- when BER::NOSUCHOBJECT
126
- "Error: No Such Instance currently exists at this OID"
127
- else
128
- raise(SnmpClientError, "unknown variable syntax #{variable_syntax}, #{variable.getSyntaxString}")
129
- end
41
+ def get_pdu_factory
42
+ DefaultPDUFactory.new
130
43
  end
131
44
 
132
45
  def build_target(address, community, version, retries, timeout)
@@ -138,16 +51,5 @@ module LogStash
138
51
  target.setVersion(parse_version(version))
139
52
  target
140
53
  end
141
-
142
- def parse_version(version)
143
- case version.to_s
144
- when "2c"
145
- SnmpConstants.version2c
146
- when "1"
147
- SnmpConstants.version1
148
- else
149
- raise(SnmpClientError, "protocol version '#{version}' is not supported, expected versions are '1' and '2c'")
150
- end
151
- end
152
54
  end
153
55
  end