BLOG     |     FORUM
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.RepositoryManager")

Ruby

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

 

Events

None

Properties and Methods

Name Parameters Access Description
LoadRepository RepositoryDB object - Return value NA This method must be called after creating the top level object. Loads in the UnbrowseSNMP MIB Repository file.
SaveRepository NA Saves any changes made to the MIB Repository
GetGlobalRepEntry String - Module Name

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

Eg :
Set modinfo = MibRep.GetGlobalRepEntry ("SNMPv2-MIB")
LoadRepositoryReadOnly RepositoryDB object - Return value NA 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

Name Parameters Access Description
OIDIndexTable OIDTable object -
return value
NA Get the OID Table. This table contains allows you to quickly look up SNMP OIDs
OIDToName String - OID

String - Name (return value)
NA Converts 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
OIDToNameShort String - OID

String - Short Name (return value)
NA Converts 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

Name Parameters Access Description
ModuleName
Read The 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 Read A short description about the MIB module
OID Read The OID corresponding to the MIB. This OID is also known as the "MODULE-IDENTITY"
OIDName Read The Name corresponding to the MIB. Corresponds to the MODULE-IDENTITY OID
ASNURI Read The 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

Name Parameters Access Description
NodeType NodeType Read
Write
The node type (whether is a leaf, table, table entry, notification, etc)
OID String Read The OID assigned to this node
Name String Read The name assigned to this node
ModuleName String Read The name of the SNMP MIB in which this node is defined (eg, SNMPv2-MIB)
ModuleInfo ModuleInfo Object Read The 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

Name Parameters Access Description
FindMatch
String - OID

ObjectInfo object - Return value
NA Find 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"
AddOID String - OID

String - Name
NA Allow you to add an OID to Name lookup entry. You can use this method if you cannot compile in the MIB itself.
Entries Collection of ObjectInfo objects NA Use this to iterate through all the SNMP nodes known to Unbrowse SNMP.

Eg,
For Each snmpnode In OIDTbl.Entries
- - -
Next
NumEntries Numeric NA Number of SNMP nodes compiled into UnbrowseSNMP.
FindNameMatch String - Name

Second parameter - must be zero

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

Eg,

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

String - Second OID

Bool - Return
NA Are 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.