Difference between revisions of "NXSL:SNMPWalk"

From NetXMS Wiki
Jump to navigation Jump to search
Line 19: Line 19:
== Return Value ==
== Return Value ==


Array of SNMP_VarBind objects or null on failure.
Array of SNMP_VarBind objects or '''NULL''' on failure.


== Examples ==
== Examples ==

Revision as of 12:04, 22 October 2014

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);		
	}