Project

net-snmp2

0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Cross platform net-snmp wrapper for Ruby, building on the original net-snmp gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

net-snmp2

Gem Version

Just getting started? Checkout the wiki

An object oriented Ruby wrapper around the C netsnmp libraries. It provides classes for manager sessions, agents, pdus, varbinds, MIB inspection, and more.

The gem also includes some useful executables including:

  • net-snmp2
    • An interactive REPL for inspecting the MIB, and acting as an SNMP manager.
    • Supports managing multiple agents at once.
    • Implemented on top of Pry, so it inherits all of Pry's goodness.
  • mib2rb
    • A mib2c like tool that uses ERB files to format and display the system MIB.
    • mib2rb has a default template that prints the MIB details in a human-readable format, providing functionality similar to snmptranslate.

Features

  • Improved Windows support over original net-snmp gem
  • Supports SNMP versions 1, 2c, and 3
  • Supports both synchronous and asynchronous calls
  • Supports sending of snmpv1 traps and snmpv2 traps/informs using TrapSession
  • Integrates well with eventmachine, or can be used standalone.
  • In Ruby 1.9, uses fibers behind the scenes to emulate synchronous calls asynchronously
  • MIB support
  • Convenience methods such as session.walk, session.get_columns, and session.table
  • SNMP Agent support
  • Trap handler support

Notes

  • TrapHandler & Agent support doesn't work on default Windows build of net-snmp libraries, due to certain functions not being exported in the dll.
    • I've submitted this as a feature request
    • The patch has been accepted!
      • These changes are now available in net-snmp master, as well as v5.7-patches
      • You can build either of these from source if you need trap handler & agent support on Windows...
      • Or, you can wait until they release an official binary of v5.7
      • Or, you can try my pre-built DLL
  • The wiki has the best documentation for now.
    • All the specs are passing, so that's another good place to go for information.
    • There is also the built-in net-snmp2 program you can run. This is an interactive Pry shell that is very useful for digging around the code and getting a feel for how to do things.