Difference between revisions of "NXSL:SNMPWalk"

From NetXMS Wiki
Jump to navigation Jump to search
m (Text replacement - "^" to "{{deprecated}}")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__
{{deprecated}}__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.  


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 ==

Latest revision as of 18:13, 13 September 2022

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