1 Dynamic indexes
Overview
Index numbers may be dynamic - they may change over time and your item may stop working as a consequence.
To avoid this scenario, it is possible to define an OID which takes into account the possibility of an index number changing.
For example, if you need to retrieve the index value to append to ifInOctets that corresponds to the GigabitEthernet0/1 interface on a Cisco device, use the following OID:
The syntax
<OID of data>[“index”,”<base OID of index>”,”<string to search for>”]
Example
Getting memory usage of apache process.
If using this OID syntax:
Now we have the index, 5388. The index will be appended to the data OID in order to receive the value we are interested in:
Index lookup caching
When a dynamic index item is requested, Zabbix retrieves and caches whole SNMP table under base OID for index, even if a match would be found sooner. This is done in case another item would refer to the same base OID later - Zabbix would look up index in the cache, instead of querying the monitored host again. Note that each poller process uses separate cache.
In all subsequent value retrieval operations only the found index is verified. If it has not changed, value is requested. If it has changed, cache is rebuilt - each poller that encounters a changed index walks the index SNMP table again.