[ZBXNEXT-5499] Support for MACROS within JSONPath Created: 2019 Oct 10 Updated: 2023 Sep 29 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request | Priority: | Trivial |
Reporter: | Václav Nováček | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 23 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | Content_of_HOST.NAME.png HOST.NAME.png Host_macros.png NOT_working_zabbix_macro.png Working_user_macro.png json_path_zabbix_ticket.txt zbx_export_hosts.xml | ||||||||||||
Issue Links: |
|
Description |
Support for such of notation using item preprocessing would be great...
$.['{ITEM.NAME}']
Thanks in advance! |
Comments |
Comment by Tomáš Heřmánek [ 2020 Sep 16 ] |
Hi, for simulation of this problem create example json data (json_path_zabbix_ticket.txt) and upload it on public url. In my example url is: https://www.coreit.cz/download/json_path_zabbix_ticket.txt after that create a new host (exported with items in attachment zbx_export_hosts.xml). And create a user macro with hostname. {$USER.MACRO} = 2a2820715eef44c1933002889f5836ac Create several test http items, without json path, with direct written json path, user macros json path and json path with {HOST.NAME}. 3 items work fine but item with zabbix macros {HOST.NAME} fails with this error: Preprocessing failed for: [..{..."inactive": false,..."storeNumber": 4008,..."storeShortNumber": "008",..."storeShortName":... 1. Failed: cannot extract value from json by path "$[?(@.deviceId == "{HOST.NAME}")]": no data matches the specified path Do you need any additional information?
Thanks, Tom
|
Comment by Richard Ostrochovský [ 2021 Aug 31 ] |
If this would be implemented sometimes, also support for user macro contexts would be helpful . Hi Tom, thanks for excellent webinars . |
Comment by Yuriy [ 2022 Mar 30 ] |
Up! |
Comment by Konstantins Prutkovs (Inactive) [ 2023 Sep 29 ] |
There is a new workaround for this issue in Zabbix 7.0alpha5, with the merger of feature |