-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.4.0rc1
-
Sprint 76 (May 2021)
-
0.25
Problem description: Imagine that You're using zabbix 5.2 and have a host with an aggregated item that uses the macro + time suffix combination as the "Last of" parameter, for example:
grpavg[\{$M},trap1,avg,\{$M3}s]
.
After upgrading such configuration to the latest master such function is converted into the formula in following format, without quoting the macro + time suffix combination:
avg(avg_foreach(/*/trap1?[group="\{$M}"],\{$M3}s))
As result, if the user exports such configuration from master, he will not be able to import it anymore without inserting the quotes manually.
Steps to reproduce:
- Open zabbix 5.2
- Import the following configuration: macro_with_suffix_aggregate.yaml
- upgrade database to the latest master (currently 5.4.0rc1)
- Open configuration of the "a9" item under hot "aggregate" and check "Formula" field
Result 1: in the formula the macro + time suffix combination is not quoted. - Export configuration of this host and attempt to import it.
Result 2: it is not possible to import the host due to missing quotes:Invalid parameter "/1/params": incorrect expression starting from "avg(avg_foreach(/*/trap1?[group="\{$M}"],\{$M3}s))".
Expected: the macro + time suffix combination should be quoted during conversion when upgrading the database, for example:
avg(avg_foreach(/*/trap1?[group="\{$M}"],"\{$M3}s"))
See screenshot....
See attached patch file...