Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 927 Bytes

snmpget.adoc

File metadata and controls

46 lines (38 loc) · 927 Bytes

SNMPGet()

Important

Deprecated in 3.0.

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

SNMPGet(transport, oid) => SNMP_VarBind

Perform SNMP GET request for oid over provided transport.

Table 1. Parameters

transport

Transport created by [func-createsnmptransport].

oid

SNMP OID string.

Return

Instance of [class-snmpvarbind] or null on failure.

Example
>>> transport = CreateSNMPTransport(FindObject("Server1"));
>>> if (transport != null) {
>>>   oid = ".1.3.6.1.2.1.25.1.6.0"; // number of running processes
>>>   varbind = SNMPGet(transport, oid);
>>>   if (varbind != null) {
>>>     trace(1, varbind.name .. "=" .. varbind.value);
>>>   }
>>>   else {
>>>     trace(0, "SNMPGet() failed");
>>>   }
>>> }