NXSL:SNMPWalk

From NetXMS Wiki
Jump to navigation Jump to search
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Get an array of the object values from specific node with SNMP WALK request. The node and all SNMP communication details defined by SNMP transport.

Since: 1.2.1

Syntax

SNMPWalk(transport,oid);

Parameters

transport SNMP_Transport SNMP transport object.
oid SNMP object id to start walking from.

Return Value

Array of SNMP_VarBind objects or NULL on failure.

Examples

	transport = CreateSNMPTransport(FindObject("MYWORKPC"));
	if (transport == null)
            return -1;
	oid = ".1.3.6.1.2.1.25.4.2.1.2"; // Names of the running processes
	vars = SNMPWalk(transport, oid);
	if (vars == null)
            return -2; // SNMPWalk failed	
	foreach (v: vars) {
	    trace(1, "SNMP WALK ".v->name."=".v->value);		
	}