Difference between revisions of "NXSL:SNMPWalk"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ 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. == Syntax == S...")
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
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.  
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 ==
== Syntax ==

Revision as of 09:57, 9 July 2012

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