SnmpWalk
The SnmpWalk method performs an SNMP walk operation
on the specified device, starting at the specified MIB variable.
Method Synopsis
SnmpWalk($host, $addOn, $oid,
$ignoreInstanceFilters)
Parameters
- $host
- Specifies a valid IP address.
- $addOn
- Specifies the suffix to the community string (usually an empty string).
- $oid
- Specifies the MIB variable from which to start the SNMP
walkoperation.
- ignoreInstanceFilters
- If instance filters have been configured for the SNMP helper,
determines whether the SNMP
walkoperation returns only the filtered instances or all data. Pass one of the following values to this parameter:- 0 -- Applies filters to the SNMP
walkoperation. - 1 -- Ignores any filters.
- 0 -- Applies filters to the SNMP
Description
The SnmpWalk method
performs an SNMP walk operation on a given device,
starting at the specified MIB variable ($oid).
The SnmpWalk method returns either only filtered
instances or all data, depending on the value passed to the $ignoreInstanceFilters parameter.
Example Usage
my ($results, $status) = $snmp->SnmpWalk("1.2.3.4", "", "ifTable", 1);
Returns
Upon successful completion, the SnmpWalk method
returns a 2-element array. The first element is a reference to an
array of returned SNMP data. Each element has the same format as returned
by the SnmpGetNext method. The second element is
a hash of additional data. This hash can include the following fields:
- m_InstanceFiltered -- If present, this field indicates that instance filtering was applied to the returned results.
- m_ErrorStatus -- If present, this field indicates any error status detected by the SNMP helper while trying to process the query.