Hello, I am trying to do LLD host discovery based on the item output on hosts. (Zabbix 6.4)
I have created a new template with the item 'Dispatcher hosts discovery' which returns JSON like this:
I created a discovery rule dependent item with LLD macros and a host prototype
$.result.RECORDS[?(@.SET.ID==999)].SET.TARGETS.*.DEST.URI returns ["sip:2.2.2.2", "sip:8.8.8.8"]
And I created a simple host prototype
And I can see the error
Is it necessary to have "data" in output JSON? is there any workaround to fix it?
I have created a new template with the item 'Dispatcher hosts discovery' which returns JSON like this:
Code:
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 2,
"RECORDS": [{
"SET": {
"ID": 111,
"TARGETS": [{
"DEST": {
"URI": "sip:1.1.1.1",
"FLAGS": "IP",
"PRIORITY": 0,
"LATENCY": {
"AVG": 0,
"STD": 0,
"EST": 0,
"MAX": 0,
"TIMEOUT": 5
}
}
}]
}
}, {
"SET": {
"ID": 999,
"TARGETS": [{
"DEST": {
"URI": "sip:2.2.2.2",
"FLAGS": "AP",
"PRIORITY": 0,
"LATENCY": {
"AVG": 42,
"STD": 0,
"EST": 42,
"MAX": 42,
"TIMEOUT": 0
}
}
}, {
"DEST": {
"URI": "sip:8.8.8.8",
"FLAGS": "AP",
"PRIORITY": 0,
"ATTRS": {
"BODY": "zabbix-host=TODO-extract-hostname-from-here",
"DUID": null,
"MAXLOAD": 0,
"WEIGHT": 0,
"RWEIGHT": 0,
"SOCKET": null,
"SOCKNAME": null,
"OBPROXY": null
},
"LATENCY": {
"AVG": 27,
"STD": 0,
"EST": 27,
"MAX": 27,
"TIMEOUT": 0
}
}
}]
}
}]
},
"id": 4043662
}
I created a discovery rule dependent item with LLD macros and a host prototype
$.result.RECORDS[?(@.SET.ID==999)].SET.TARGETS.*.DEST.URI returns ["sip:2.2.2.2", "sip:8.8.8.8"]
And I created a simple host prototype
And I can see the error
Is it necessary to have "data" in output JSON? is there any workaround to fix it?

Comment