Translations of this page:
ODT Export
 

2 Use of dynamic indexes

Dynamic indexes are supported since Zabbix version 1.5.

A special syntax for item OID can be used in order to deal with dynamic data (random IDs of network interfaces, etc). The syntax:

<base OID of data>["index","<base OID of index>","<string to search for>"]

For example, to get the ifInOctets value for the GigabitEthernet0/1 interface on a Cisco device, use the following OID:

ifInOctets["index","ifDescr","GigabitEthernet0/1"]
ParameterDescription
base OID of dataBase OID to use for data retrieval.
indexMethod of processing. Currently one method is supported
index – search for index and append it to the base OID
base OID of indexThe OID will be used to make a lookup for the string.
string to search forThe string is used for exact match with a value when doing lookup. Case sentitive.

Another example, getting memory usage of apache process:

HOST-RESOURCES-MIB::hrSWRunPerfMem["index","HOST-RESOURCES-MIB::hrSWRunPath", "/usr/sbin/apache2"]
...

HOST-RESOURCES-MIB::hrSWRunPath.5376 = STRING: "/sbin/getty"
HOST-RESOURCES-MIB::hrSWRunPath.5377 = STRING: "/sbin/getty"
HOST-RESOURCES-MIB::hrSWRunPath.5388 = STRING: "/usr/sbin/apache2"
HOST-RESOURCES-MIB::hrSWRunPath.5389 = STRING: "/sbin/sshd"
...

Now we have index, 5388. The index will be appended to the Data OID in order to receive value we are interested in:

HOST-RESOURCES-MIB::hrSWRunPerfMem.5376 = INTEGER: 528 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5377 = INTEGER: 528 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5388 = INTEGER: 31468 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5389 = INTEGER: 31740 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5390 = INTEGER: 32116 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5391 = INTEGER: 30420 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5392 = INTEGER: 32560 Kbytes

Dynamic indexes are cached since Zabbix version 1.6.3.

Using dynamic indexes leads to more SNMP queries in Zabbix versions up to 1.7. Dynamic index lookup and data retrieval is performed in single connection since Zabbix version 1.7.

 
1.8/manual/advanced_snmp/dynamic_indexes.txt · Last modified: 2009/12/17 16:48 by richlv
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki