Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 996 Bytes

snmpwalk.adoc

File metadata and controls

45 lines (37 loc) · 996 Bytes

SNMPWalk()

Important

Deprecated in 3.0.

Please use walk method of [class-snmptransport] class.

SNMPWalk(transport, oid) => Array

Perform SNMP WALK request for oid over provided transport and return collected values as array of [class-snmpvarbind] or null on failure.

Table 1. Parameters

transport

Transport created by [func-createsnmptransport].

oid

SNMP OID string.

Return

Array of [class-snmpvarbind] or null or failure.

Example
>>> transport = CreateSNMPTransport(FindObject("Server1"));
>>> if (transport != null) {
>>>     oid = ".1.3.6.1.2.1.25.4.2.1.2"; // Names of the running processes
>>>     vars = SNMPWalk(transport, oid);
>>>     if (vars != null) {
>>>         foreach (v: vars) {
>>>             trace(1, v.name .. "=" .. v.value);
>>>         }
>>>     }
>>> }