This patch adds the following features for SNMP monitoring:
- "count" operation, which counts SNMP indexes with corresponding value
- "sum" operation, which calculates the sum of SNMP values by SNMP indexes with corresponding value
- textual representation of SNMP value is used when comparing, existing Zabbix versions work well only on string values. Thus, SNMP index being integer or quoted string will be matched correcly
- regex matching is used for comparing SNMP index values in all modes: "index", "count", "sum"
- internal caching infrstructure (hashset) is used to store SNMP indexes, which improves effectiveness and reuses existing code. Efficiency is achieved by sharing the SNMP index cache between SNMP poller processes. To control the size of the cache additional configuration option was introduced, 'SNMPCacheSize'
Several use cases for features implemented are below.
Use case 1. Counting number of specific processes (eg. 'httpd')
Use case 2. Getting the RAM amount consumed by specific process (eg. 'snmpd')
Use case 3. Get the version of packege installed (maybe OS specific and depends on SNMP daemon)
Use case 4. Get the number of processes running. Note that 'running' value is internally represented as integer with value '2'.