Mapped instances are managed in the collector and the
fetch routines don't know anything about them. If a
mapped instance is in use, the collecter appends a new
dummy datasource for the SNMP fetch routine to lookup.
This datasource is the lookup key for the instance
(baseoid tag of the map dictionary). The collector then
compares the value of this dummy datasource to the
match tag of the map dictionary. If they don't match,
then it assumes that the instance has changed. It looks
up the instance and then collected the data for that
instance.
In the current code (1.0.4 and 1.0.5), a mapped
instance with a non-numeric baseoid will always force a
instance lookup; that is the interface will be queried
twice for each target because Cricket believes the
instance number keeps changing. How does this happen?
SNMP returns a non-numeric value (say a string) for the
baseoid key as part of the verify lookup. But snmpFetch
in snmp.pm assumes that the value must be a number
and calls fixNum() to "fix" it. The routine fixNum (Util.pm)
replaces the non-numeric value with a "U". Finally, the
collector compares the "U" with the value of the match
tag from the map dictionary. It doesn't match, so the
code assumes the instance changed.