-
Patch request
-
Resolution: Fixed
-
Trivial
-
4.0.16
-
None
-
Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020)
-
0.5
It seems like there was a regression in JSON Path parsing due to the changes in 4.0.11 (https://www.zabbix.com/rn/rn4.0.11), I built a template on 4.0.10 which worked fine until I migrated to 4.0.16.
Steps to reproduce:
- create master item with JSON data, i.e.
{"D:\\Xyz": {"free": 1234}}
- create discovery that returns
{#NAME} = "D:\Xyz"
(note single backslash)
- create dependent item inside discovery
- add preprocessing
JSON Path -> $['{#NAME}'].free
- link to hosts, wait for discovery and keys
- item preprocessing fails
So, simply put, you can't use single backslashes in the JSON Path parameter anymore, they need to be escaped?
I know why this happens but I think the correct behavior is to allow single backslashes in user-facing fields (except maybe regex fields) and fix them in the backend if necessary.
jsonpath.com seems to accept single backslashes (attachment)...