MIB Walker

MIB Walker Reference

MIB Walker Script Reference Diagram
Links

MIBWalker (top level object)

Provides methods to load an existing MIB Walk Database, to navigate SNMP walk files, to retrieve SNMP variables from an agent, to set the values of SNMP objects.

The top level object to access the SNMP MIB Walker is called "UnbrowseSNMP.MIBWalker"

Creating the top level object

VBScript

Set Walker = CreateObject("UnbrowseSNMP.MIBWalker")

Ruby

walker = WIN32OLE.New("UnbrowseSNMP.MIBWalker")

Events

None

Properties and Methods

NameParametersAccessDescription
NewWalkerMIBWalkSession object - return valueNACreate a new MIB Walk Session
OpenWalkSession
String - Path NameNAOpen the MIB Walk database file specified.

Note: Unbrowse SNMP stores each MIB walk session in a database file with the file extension *.VOWLK
Save
NoneNASave changes to the MIB walk database
SaveAsString - Path NameNASave changes to the MIB walk database into the file specified
DiscardNoneNADiscard all changes made to the MIB walk database file
WalkerCountNumeric ReadReturn the number of MIB Walk Session in the database
GetWalkerByIndex
Numeric - Index

MIBWalkSession object - return value
NAReturn the MIBWalkSession object identified by the index
GetLatestWalkerMIBWalkSession object - return valueNAReturn the latest MIBWalkSession

MIBWalkSession

Provides access to MIB Walking facilities. Allows you to retrieve and set SNMP objects in a real snmp agent such as routers, switches, servers, etc.

Events

Event NameParametersDescription
WNF_GetLimitNumeric Indicates progress of retreiving scalar variables.

The number of nodes retrieved is returned in the event parameters.
WNF_GetCompleteNoneIndicates completion of scalar varibles.

All scalar variables have been retrieved from the agent.
WNF_WalkLimitMIBWalkNode - the table object

Numeric - table leaf

Numeric - number of indexes retrieved
Indicates progress of table retrieval
WNF_WalkCompleteMIBWalkNode - the table node objectIndicates completion of table retrieval
WNF_EOW Indicates succesful end of MIB Walking
WNF_ErrorNumeric - error code

String - error text
Indicates premature end of MIB Walking due to error

The numeric error code is for Unleash Networks debugging purposes.

Properties and Methods

NameParametersAccessDescription
NameStringRead
Write
An optional name attached to this MIBWalkSession.
StartTimeNumericReadStart time in seconds since Jan 1 1970
GetWalkTreeMIBWalkTree object - Return valueReadReturn the MIBWalkTree.

A MIBWalkTree is a collection of SNMP Nodes that were retrieved from the agent.
StatusNumeric ReadA number representing the status of the MIBWalkSession.

See the VSnWStatus enumeration for a list of all valid status codes
DoWalk NARetrieve requested SNMP objects from the agent.

This method does not return until the operation is complete.
DoWalk_Thr NARetrieve requested SNMP objects from the agent. Use events to notify progress.

This method fires events to notify your script of progress.
DoBulkWalk_Thr NASame as DoWalk_Thr, but uses SNMP GETBULK operations.
SetAgentSnmpAgent objectNASet the target agent
GetAgentSnmpAgent object - return valueNARetrieve the target agent
Cancel NACancel the SNMP retrieval operation in progress
GetResultsMIBWalkResults object - Return valueReadReturn the MIBWalkResults object associated with this walk session.

You must use the MIBWalkResults object to navigate the OIDs and Values retrieved from the agent.
MaxRepetitions
NumericRead
Write
Max repetitions for GETBULK
NumRepeaters
NumericRead
Write
Num repeaters for GETBULK
TryMaxPackingBoolRead
Write
Try to pack as many OIDs in a PDU as you can
PerformReachTestBoolRead
Write
Perform a simple reachability test by retrieving sysUpTime before trying to walk the agent MIB.
DoSetMIBWalkNode - node

String - index in OID format

String - value
NAPerform a SNMP Set on a MIBWalkNode
DoBulkSet
Array of Indexes

Array of MIBWalkNodes

Array of Values
NAThis is a bulk version of the DoSet method
DoSet_SMISnmpAgent object

A MIBNode object

An Index string

A Value string
NASet the value of the specified node.

Use MIBNode object instead of MIBWalkNode object. Hence the SMI qualifier in the method name.
DoBulkSet_SMISnmpAgent object

String - an index

Array of MIBNode objects

Array of Value strings
NASet operation using MIBNode objects instead of MIBWalkNode objects.

MIBWalkResults

Provides methods to navigate the results of a MIB walk.

Events

None

Properties and Methods

NameParametersAccessDescription
TotalRetrievedNumericReadTotal number of objects retrieved from the agent
ScalarsRetrievedNumericReadTotal number of scaler objects (non indexed) retrieved
StartTimeNumericReadStart time in seconds since Jan 1, 1970
ElapsedTimeNumericReadTotal time taken to retrieve the objects in seconds.
GetWalkTreeMIBWalkTree object - Return valueReadReturns the MIBWalkTree object

MIBWalkTree

Provides methods to navigate the nodes in a MIBWalk

Events

None

Properties and Methods

NameParametersAccessDescription
AddSmiNodeMIBNode objectNAAdd this MIB node to the list of nodes you want to retrieve from the agent.
AddSmiNodesArray of MIBNode objectsNAAdd these MIB nodes to the list of nodes you wish to retrieve from the agent
ChildCountNumericReadThe number of children of this walk tree. This represents the immediate children only. You have to navigate the methods in the MIBWalkNode objects to look deeper.
ChildByIdx Numeric - Index

MIBWalkNode object - return value
NAReturn the child node at the specified index

MIBWalkNode

Properties and values of a single SNMP node. You can also navigate the MIB tree from each node by following the child nodes.

Events

None

Properties and Methods

NameParametersAccessDescription
NameStringReadName property
OIDNameStringReadOIDName property
OIDStringReadOID
ModuleNameStringReadName of the defining MIB module
BaseTypeNumeric - see the BaseType enumReadThe SMI base type of the node.

See the BaseType enumeration for a list of valid values.
TableVarbindCountNumericReadNumber of valid rows (indexes) retrieved
TableVarbindByIdxVarbind object - return value Get the varbind at the specified index. The valid ranges are 0 to TableVarbindCount -1
HasScalarVarbindBoolReadWas a valid scalar varbind retrieved from the agent for this node ?
ScalarVarbindVarbind object - return valueReadReturn the scalar varbind
FirstChildMIBWalkNode object - return valueNAReturns the first child of this MIBNode.

Example :

Set tableEntry = TblNode.FirstChild
ChildCountNumericReadReturns the total number of immediate children
ChildByIdxNumeric - Index value

MIBWalkNode object - return value
NAReturns the immediate child identified by the index
TypenameStringNATypename property
UnitsStringNAUnits property
WNodeTypeNumeric - see WalkNodeType enumNAThe node type.

See the WalkNodeType enum for a list of valid node types

Varbind

A simple variable binding. A varbind is an association of an OID with a value.

Events

None

Properties and Methods


NameParametersAccessDescription
OIDStringReadThe OID of the varbind. For table resuts, this is the index part of the OID.
ValueStringReadThe value


Enumerations

WalkStatus Enumeration


typedef enum {
VSNW_STATUS_IDLE = 0,
VSNW_STATUS_INPROGRESS = 1,
VSNW_STATUS_OK = 2,
VSNW_STATUS_FAIL = 3,
VSNW_STATUS_USERCANCEL = 4,
VSNW_STATUS_FREEZE = 5,
VSNW_STATUS_ENABLE = 6,
VSNW_STATUS_DISABLE = 7,
} VSnWStatus;


WalkNodeType enumeration


typedef enum {
VSNW_NODETYPE_LEAF_SCALAR = 0,
VSNW_NODETYPE_LEAF_VECTOR = 1,
VSNW_NODETYPE_TABLE = 2,
VSNW_NODETYPE_TABLE_ENTRY = 3,
VSNW_NODETYPE_LEAF_VECTOR_INDEX = 4,
} VSnWNodeType;