Hello
I do not understand how I can use the time shift for a calculated item, to calculate the change in % from the last value with a value which Zabbix has collected 1h (or 3h, or 1day) before the last value.
Origin Item:
- name: Value XY
- key: value[xy]
- interval 5m
This item below is working fine.
Calculated Item:
- name: Change in % Value XY
- key: ci.valuechange[xy,5m]
- calculation: round(((last(//value[xy]) - last(//value[xy],#2)) / last(//value[xy],#2)) * 100,4)
This item below is not working and I cannot figure out why. All calculations failed.
Calculated Item:
- name: Change in % Value XY
- key: ci.valuechange[xy,1h]
calculations:
round(((last(//value[xy]) - last(//value[xy],1h:now)) / last(//value[xy],1h:now) * 100,4)
round(((last(//value[xy]) - last(//value[xy],now-1h)) / last(//value[xy],now-1h) * 100,4)
round(((last(//value[xy]) - last(//value[xy],1h)) / last(//value[xy],1h) * 100,4)
round(((last(//value[xy]) - last(//value[xy],#1:now-1h)) / last(//value[xy],#1:now-1h) * 100,4)
round(((last(//value[xy]) - last(//value[xy],#1:1h)) / last(//value[xy],#1:1h) * 100,4)
I would appreciate it if somebody could explain to me, what's wrong with the time shift in my calculations,
I do not understand how I can use the time shift for a calculated item, to calculate the change in % from the last value with a value which Zabbix has collected 1h (or 3h, or 1day) before the last value.
Origin Item:
- name: Value XY
- key: value[xy]
- interval 5m
This item below is working fine.
Calculated Item:
- name: Change in % Value XY
- key: ci.valuechange[xy,5m]
- calculation: round(((last(//value[xy]) - last(//value[xy],#2)) / last(//value[xy],#2)) * 100,4)
This item below is not working and I cannot figure out why. All calculations failed.
Calculated Item:
- name: Change in % Value XY
- key: ci.valuechange[xy,1h]
calculations:
round(((last(//value[xy]) - last(//value[xy],1h:now)) / last(//value[xy],1h:now) * 100,4)
round(((last(//value[xy]) - last(//value[xy],now-1h)) / last(//value[xy],now-1h) * 100,4)
round(((last(//value[xy]) - last(//value[xy],1h)) / last(//value[xy],1h) * 100,4)
round(((last(//value[xy]) - last(//value[xy],#1:now-1h)) / last(//value[xy],#1:now-1h) * 100,4)
round(((last(//value[xy]) - last(//value[xy],#1:1h)) / last(//value[xy],#1:1h) * 100,4)
I would appreciate it if somebody could explain to me, what's wrong with the time shift in my calculations,
Comment