I'm trying to configure a simple Host LLD from JSON over HTTP source, like this one: https://pastebin.com/raw/YWWxGs7y
It uses Preprocessing step with JSONpath (I can test it with built-in testing tool) and 3 LLD-macros which are JSONPaths, too. I test them with output (Result) JSON from built-in testing tool and https://jsonpath.com/
My LLD fails with multiple errors:
I guess that LLD-Macro's value remains empty, but I have no idea how to check and solve this
My Template (how can I attach a file?)
It uses Preprocessing step with JSONpath (I can test it with built-in testing tool) and 3 LLD-macros which are JSONPaths, too. I test them with output (Result) JSON from built-in testing tool and https://jsonpath.com/
My LLD fails with multiple errors:
Code:
Cannot create host "{#LOCATION_ID}": name contains invalid character '{'.
Cannot create host "{#LOCATION_ID}": name contains invalid character '{'.
Cannot create host "{#LOCATION_ID}": name contains invalid character '{'.
Cannot create host "{#LOCATION_ID}": name contains invalid character '{'.
...
My Template (how can I attach a file?)
Code:
zabbix_export:
version: '6.2'
date: '2023-02-15T14:20:24Z'
template_groups:
-
uuid: ea8da0a2b67548b2984e3db9e32283e3
name: Test
host_groups:
-
uuid: fe9787f6bc204ac6bd6cffff87c90502
name: Delete
templates:
-
uuid: 5c223d99b28a48faa12e30f486a73fe4
template: 'JSON over HTTP LLD Test'
name: 'JSON over HTTP LLD Test'
groups:
-
name: Test
discovery_rules:
-
uuid: f931ee3db784403ea9d54edbb653f37a
name: Test
type: HTTP_AGENT
key: json_over_http
host_prototypes:
-
uuid: a01ddbdef5704097a89ff4a36001d331
host: '{#LOCATION_ID}'
name: '{#LOCATION_TYPE} {#LOCATION_NAME}'
group_links:
-
group:
name: Delete
url: 'https://pastebin.com/raw/YWWxGs7y'
lld_macro_paths:
-
lld_macro: '{#LOCATION_ID}'
path: '$.[*].id'
-
lld_macro: '{#LOCATION_NAME}'
path: '$.[*].name'
-
lld_macro: '{#LOCATION_TYPE}'
path: '$.[*].type'
preprocessing:
-
type: JSONPATH
parameters:
- $.items
Comment