MIB Repository

MIB Repository Reference

MIB repository diagram

The more MIBs you compile into the system the smarter Unbrowse SNMP becomes. All MIB information is stored in a special database called the "MIB Repository". You can query the MIB Repository for any information about SNMP OIDs, SNMP module, or objects.

Links

MIB Repository (top level object)

Provides scripting access to the MIB Repository. All other objects are created via methods and properties of this top level object. The top level object to access the MIB Repository is called "UnbrowseSNMP.MIBRepository"

Creating the top level object

VBScript

Set Rep = CreateObject("UnbrowseSNMP.MIBRepository")

Ruby

repo = WIN32OLE.New("UnbrowseSNMP.MIBRepository")

Events

None

Properties and Methods

NameParametersAccessDescription
LoadRepositoryRepositoryDB object - Return valueNAThis method must be called after creating the top level object. Loads in the UnbrowseSNMP MIB Repository file.
SaveRepository NASaves any changes made to the MIB Repository
GetGlobalRepEntryString - Module Name

Module Info Object - Return value
NAGet the module info object for a given module name.

Eg :
Set modinfo = MibRep.GetGlobalRepEntry ("SNMPv2-MIB")
LoadRepositoryReadOnlyRepositoryDB object - Return valueNA Loads in the UnbrowseSNMP MIB Repository file in read only mode. Use this method if you are only interested in lookups and not modifications

RepositoryDB

Represents the repository database. Provides access to OID lookups and SNMP module information.

Events

None

Properties and Methods

NameParametersAccessDescription
OIDIndexTableOIDTable object -
return value
NAGet the OID Table. This table contains allows you to quickly look up SNMP OIDs
OIDToNameString - OID

String - Name (return value)
NAConverts an OID to a full name
eg, converts .1.3.6.1.2.1.1.2 to
.iso.dod.internet.mgmt. mib-2.system.sysUpTime
OIDToNameShortString - OID

String - Short Name (return value)
NAConverts an OID to a short name
eg, converts .1.3.6.1.2.1.1.2 to sysUpTime
OIDToNamePrefix

String - OID

String - OID Name (return value)

 NA

Converts an OID as far as possible to a human readable name. Eg converts .1.3.6.1.2.1.2.2.1.9.99 to ifLastChange.99

The other OIDToName methods look for exact matches.


ModuleInfo

Information about a SNMP MIB module compiled into Unbrowse SNMP.

Events

None

Properties and Methods

NameParametersAccessDescription
ModuleName
 ReadThe name of the SNMP MIB
PathURI Read
Write
The location of the compiled MIB file.

Note: For instant access to even huge mib files, Unbrowse SNMP compiles the text into an internal format. The compiled MIB files have a *.VOSMI file extension.
ShortDesc ReadA short description about the MIB module
OID ReadThe OID corresponding to the MIB. This OID is also known as the "MODULE-IDENTITY"
OIDName ReadThe Name corresponding to the MIB. Corresponds to the MODULE-IDENTITY OID
ASNURI ReadThe location of the text MIB file. This is the normal format in which MIBs are written and distributed.

Note: The ASN stands for Abstract Syntax Notation, the language in which SNMP MIBs are written.

ObjectInfo

Information about a single SNMP object (OID).

Events

None

Properties and Methods

NameParametersAccessDescription
NodeTypeNodeTypeRead
Write
The node type (whether is a leaf, table, table entry, notification, etc)
OIDStringReadThe OID assigned to this node
NameStringReadThe name assigned to this node
ModuleNameStringRead The name of the SNMP MIB in which this node is defined (eg, SNMPv2-MIB)
ModuleInfoModuleInfo ObjectReadThe ModuleInfo object associated with this node.


OIDTable

Provides access to detailed information about any SNMP object (OID) compiled into UnbrowseSNMP.

Events

None

Properties and Method

NameParametersAccessDescription
FindMatch
String - OID

ObjectInfo object - Return value
NAFind the object info object corresponding to the given OID. You can then use the ObjectInfo object for more operations.

Eg.

Set ObjInfo = Tbl.FindMatch ".1.3.6.1.2.1.1"
AddOIDString - OID

String - Name
NAAllow you to add an OID to Name lookup entry. You can use this method if you cannot compile in the MIB itself.
EntriesCollection of ObjectInfo objectsNAUse this to iterate through all the SNMP nodes known to Unbrowse SNMP.

Eg,
For Each snmpnode In OIDTbl.Entries
- - -
Next
NumEntriesNumericNANumber of SNMP nodes compiled into UnbrowseSNMP.
FindNameMatchString - Name

Second parameter - must be zero

ObjectInfo object - return value
NAFind the SNMP object corresponding to the given name.

Eg,

Set info = Tbl.FindNameMatch "sysUpTime",0
AreInSameTreeString - First OID

String - Second OID

Bool - Return
NAAre the two OIDs in the same tree ?
Example : .1.3.6.1.2.1.1 and .1.3.6.1.2.1.1.2 are the same tree.