In aggregate calculations information from several items may be collected by Zabbix server (by doing direct database queries) to calculate an aggregate, depending on the aggregate function used.
Aggregate calculations do not require any agent running on the host being monitored.
To define aggregate calculations, select the Calculated item type.
Aggregates can be retrieved by working with either:
aggregate_functionis one of the supported aggregate functions: avg, max, min, sum, etc.
foreach_functionis one of the supported foreach functions: avg_foreach, count_foreach, etc.
Foreach functions work with the history of multiple items and return an array of values - one for each item.
An aggregate calculation may become unsupported if:
Examples of keys for aggregate calculations.
Total disk space of host group 'MySQL Servers'.
Average processor load of host group 'MySQL Servers'.
5-minute average of the number of queries per second for host group 'MySQL Servers'.
Average CPU load on all hosts in multiple host groups that have the specific tags.
avg(last_foreach(/*/system.cpu.load?[group="Servers A" and group="Servers B" and group="Servers C" and (tag="Service:" or tag="Importance:High")]))
Calculation used on the latest item value sums of a whole host group.
sum(last_foreach(/*/net.if.out[eth0,bytes]?[group="video"])) / sum(last_foreach(/*/nginx_stat.sh[active]?[group="video"]))
The total number of unsupported items in host group 'Zabbix servers'.