Zabbix takes the sum of multiple hosts with the same key value
In our actual work, we will encounter three machines for load balancing. in order to take the visits of the three hosts, it is necessary to add the total visits of the three machines.
In the server1 server2 server3 of these three machines, the key values of the traffic monitoring items of the three machines should be the same. The three machines can be in the same group, but they can no longer support the same group.
Suppose you are in the same group:
To make it easier to distinguish, we create a new agent host
Secondly, we create monitoring items.
To select the corresponding information type, the formula:
Last ("hostname: key value")
Last ("server1:key") + last ("server2:key") + last ("server3:key")
When the trigger is set, an alarm is generated when the sum of the three is greater than how much.
For more information about zabbix calculations, see: https://www.zabbix.com/documentation/4.0/zh/manual/config/items/itemtypes/calculated