[ZBX-8638] Wrong rate calculation for formula with calculated items arguments Created: 2014 Aug 20  Updated: 2017 May 30  Resolved: 2014 Aug 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.2.2
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Ionel Ceausescu Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: calculateditems
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora release 19 with Zabbix server v2.2.2 (revision 42525) (12 February 2014)
Compilation time: Apr 3 2014 11:52:25



 Description   

Calculated items that contain other calculated items arguments don't always always use the last argument's calculated value.

See below example, the calculated rate:
2014.Aug.11 13:38:23 125
uses the "Calculated Argument2" value:
2014.Aug.11 13:23:22 4
instead of:
2014.Aug.11 13:38:22 9
which was updated just one second before the rate calculation.

Queried values:
Calculated rate (formula is 100*last("Argument1")/last("Calculated Argument2"):
2014.Aug.11 13:53:23 44.4444
2014.Aug.11 13:38:23 125
2014.Aug.11 13:23:23 22.2222

Argument1:
2014.Aug.11 13:50:28 4
2014.Aug.11 13:35:29 5
2014.Aug.11 13:20:28 2

Calculated Argument2:
2014.Aug.11 13:53:22 7
2014.Aug.11 13:38:22 9
2014.Aug.11 13:23:22 4



 Comments   
Comment by Aleksandrs Saveljevs [ 2014 Aug 20 ]

I believe this is expected and the order items are calculated in should not be relied upon. In this case, the value of "9" for the second item got calculated at 13:38:22, but it takes time to get the value from the poller to the history cache and from there to the value cache and to the database. So at 13:38:23 the obtained value was not yet in the value cache, so it used the last value stored there.

Comment by Ionel Ceausescu [ 2014 Aug 20 ]

Hello,

Thanks for the quick answer. Is there any way to overcome this issue in Zabbix 2.2.2? In the end sometimes it's working fine, so maybe with a finer tuning between the various mechanisms it will make the problem disappear, or at least lower its occurrence.

I see there is a new feature foreseen for 2.4, https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-2128, I hope it will get implemented, it would allow putting a delay between the calculation time of the two items and solve the issue.

BR,
Ionel Ceausescu

Comment by Oleksii Zagorskyi [ 2014 Aug 21 ]

Looks like here is nothing to fix -> issue closed.
Note: playing with itemID (item creation moment) it's possible to reach that items will be polled with for example 30 seconds difference. More details in ZBXNEXT-391.
But that's "hackish" approach

Generated at Fri Mar 29 17:53:08 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.