Calculated items are items calculated based on data of one or more already existing items in the Zabbix database. All calculations are handled by the Zabbix server and will never be calculated on the agent or the proxy.
If you want to do this exercise, then you need a Zabbix server that is properly setup and linked to the standard Linux template. Of course, you can alter the items that we have used and use your own if you like.
% free on root
.Calculated
.free.root
.100*last("vfs.fs.size[/,free]",0)/last("vfs.fs.size[/,total ]",0)
Numeric (float)
as Type of information.%
.A calculated item will calculate a new value from one or more items that already exist in the database. This means that the Zabbix server will calculate a new value of already existing data and create a new item for it.
In our case, we calculated the percentage of the free space on /
by dividing the free space from our root
filesystem with the total size from our root
filesystem and then we multiplied the data hundred times. The last option in our example makes sure that we use only the latest data from our two items.
When we create calculated items, we always need a function, key and optionally some parameters:
func(<key>|<hostname:key>,<parameter1>,...)
We can make use of many different functions and are not limited to just the latest data. For instance, we can make use of avg
, count
, max
, min
, sum
, and so on.
For a complete overview, have a look at this page in the Zabbix documentation.
https://www.zabbix.com/documentation/2.4/manual/appendix/triggers/functions.
18.225.56.194