-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.4.0
-
None
-
Zabbix 5.4.0 with MySQL 5.7
-
Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022)
-
0.25
After upgrading from Zabbix 5.2.4 to 5.4.0, our calculated items that had "0" configured for its time shift was now converted to ":now-0s" which is not working.
These calculated items are now reporting "invalid second parameter" error, eg.
Cannot evaluate function: invalid second parameter at "avg(//jmx["com.example.com:type=key1","metric1"],#2:now-0s)"
In Zabbix 5.2.4 the expression that worked was:
avg("jmx[\"com.example.com:type=key1\",\"metric1\"]",#2,0)
To fix the issue I had to go and search the database for all calculated items that included "%now-0s%" and then I went into the UI to fix it by simply removing ":now-0s":
SELECT h.host, i.* FROM items i LEFT JOIN hosts h ON h.hostid = i.hostid WHERE i.type=15 AND i.params LIKE '%now-0s%' ORDER BY i.name desc
I kind of expected this timeshift of now-0s to work, or that the migration should have excluded it from the expression.