The difference between the two values of item in Zabbix 6.0.21

68 Views Asked by At

I have a 220V PDU, a template has been created, there are items in it. One of the items shows the electricity consumed from the commissioning of the PDU. The customer asks to do something that will display the difference between the current item value and the value at the beginning of the month, for example last(//pdu220.mainEnergyTotal) - (the value of this item, the first chil of the current month, at 00:00:01). The difference is necessary to calculate the electricity consumed and compare with the PDU placement site.

1

There are 1 best solutions below

0
Iron Bishop On

You can use a calculated item, using trend functions (available since version 5.2).

Example: calculate the difference between the maximum and minimum values (trend delta) for the previous hour:

trendmax(/host/key,1h:now/h) - trendmin(/host/key,1h:now/h)