-
Problem report
-
Resolution: Fixed
-
Trivial
-
4.4.2rc1, 5.0.0alpha1
-
Sprint 59 (Dec 2019)
-
0.25
Problem description: When postgresql is used as zabbix database, LLD macro {#I} is not resolved when, for example, it is used in a preprocessing step of an item prototype. Such problem doesn't occur for exactly the same setup and MySQL.
Steps to reproduce:
- Create a trapper item (type of information = text)
- Create a low level discovery rule that depends on this item
- Specify the following macros for the LLD:
{#ID} => $.id
{#X} => $.index - Create an item prototype with the following parameters:
Type = Dependent item
Key = item{#ID}
Master item = the previously created trapper item
Type of information = text - Add the following preprocessing step to the item prototype:
Name = JSONPath
Parameters = $.[ {#X}].id - Send the following string to the trapper item created in step 1:
[{"id":101,"index":"0","path":"$.[0].value","dataSrc":"value","value":"test1"}]
Notice that the received data was successfully processed and an item with key item[101] was discovered.
- Change macro {#X} to {#I} in LLD macros and in the preprocessing step of the created item prototype.
- Remove the previously discovered item with key item[101]
- Send the same string again to the trapper item created in step 1:
[{"id":101,"index":"0","path":"$.[0].value","dataSrc":"value","value":"test1"}]
Result: Item was not discovered, the following error is observed in info column for the discovery rule:
Cannot create item: invalid value for preprocessing step #1: unsupported construct in jsonpath starting with: "{#I}].id".
Expected: item should be discovered, no error should be observed.
P.S. I've checked the same scenario for MySQL, and the item got successfully discovered using macro {#I}