SkillAgentSearch skills...

MIBBLER

Jruby wrapper for MIBBLE

Install / Use

/learn @snmpboy/MIBBLER
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

= MIBBLER -- A wrapper for MIBBLE.jar http://www.mibble.org

== Summary

MIBBLER is a Jruby wrapper around mibble.jar. It allows for parsing a mib, loading other mibs, and is meant to be used with Mark Cotner's SNMP4J. It has one class, Loaded_mibs. Accroding to the Mibble documentation MibLoader is not thread safe, therefore, create one instance and use that instance throughout your code.

=== Features

  • Use Ruby scripts to take advantage of Mibble's compile Java code.
  • Parse a mib to get OID's matched with their human readable values.
  • Load more mibs. By default it uses /usr/share/mibs but you may change the directory.

=== Usage The example is a modified example from SNMP4JR

#!/usr/bin/env jruby

require 'rubygems' require 'SNMP4JR' require 'MIBBLER'

This defaults to version 2c bulkwalk(most efficient method) unless you specify version1

Create an instance of Loaded_mibs to manipulate the Mibs. Public methods are: parse_mib, load_mib, and get_oid

mymibs = Loaded_mibs.new oids = mymibs.get_oid('dot1dBasePort', 'sysDescr')

target = SNMPTarget.new(:host => '<switch-ip-address>', :community => 'public', :version => SNMP4JR::MP::Version2c) target.max_repetitions = 1 target.non_repeaters = 2

target.get_bulk(oids).each do |vb| puts vb.to_s end

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated9y ago
Forks1

Languages

Ruby

Security Score

55/100

Audited on Sep 23, 2016

No findings