Aggregate calculations are a calculated item type allowing to collect information from several items by Zabbix server and then calculate an aggregate, depending on the aggregate function used.
Only unsigned integer and float values (type of information) are supported for aggregate calculation items.
Aggregate calculations do not require any agent running on the host being monitored.
To retrieve aggregates, you may:
function here must be a history/trend function.
Aggregate function is one of the supported aggregate functions: avg, max, min, sum, etc.
A foreach function (e.g. avg_foreach, count_foreach, etc.) returns one aggregate value for each selected item. Items are selected by using the item filter (
/host/key?[group="host group"]), from item history.
If some of the items have no data for the requested period, they are ignored in the calculation. If no items have data, the function will return an error.
For more details, see foreach functions.
If the aggregate results in a float value it will be trimmed to an integer if the aggregated item type of information is Numeric (unsigned).
An aggregate calculation may become unsupported if:
Examples of keys for aggregate calculations.
Total disk space of host group 'MySQL Servers'.
Sum of latest values of all items matching net.if.in[*] on the host.
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.
Calculation used on the latest item value sums of a whole host group.
The total number of unsupported items in host group 'Zabbix servers'.
Expressions (including function calls) cannot be used as history, trend, or foreach function parameters. However, those functions themselves can be used in other (non-historical) function parameters.
Note that in an expression like:
it cannot be guaranteed that both parts of the equation will always have the same set of values. While one part of the expression is evaluated, a new value for the requested period may arrive and then the other part of the expression will have a different set of values.