-
Incident report
-
Resolution: Duplicate
-
Minor
-
None
-
2.0.3
-
Linux, CentOS-6, PostgreSQL 9.1.4, Apache HTTPD-2.2.15, PHP-5.3.3
Please provide a way to avoid the substitution of macros within an item key definition.
For example:
Macro: {$USER_MACRO}=>bar
Item key: foo["{$USER_MACRO}"]
can not be referenced correctly in items of type "Zabbix aggregate".
I tried it in several ways without success:
grpsum["Example Group","foo[\"{$USER_MACRO}\"]",last,0] --> foo["bar"]
grpsum["Example Group","foo[\"{\$USER_MACRO}\"]",last,0] --> foo["{\$USER_MACRO}"]
grpsum["Example Group","foo[\"{$$USER_MACRO}\"]",last,0] --> foo["{$$USER_MACRO}"]
grpsum["Example Group","foo[\"\{$USER_MACRO\}\"]",last,0] --> foo["\{$USER_MACRO\}"]
And if I haven't overlooked something in the source code such a behavior is actually not implemented.
The only way to work-around this issue was adding another user macro which is set to the origin user macro definition and use this instead:
Macro: {$USER_MACRO}=>bar
Macro: {$USER_MACRO_BAR}=>{$USER_MACRO}
Item (Zabbix aggregate): grpsum["Example Group","foo[\"{$USER_MACRO_BAR}\"]",last,0] => foo["bar"]
- duplicates
-
ZBX-2866 nested aggregation function do not escape Macros in a right way
- Closed