Hello everyone,
I'm trying to process the following JSON return with Zabbix:
Example response:
Unfortunately, an attempt to create a new item fails when I select JSON Data:
I can only create the item if I select Raw Data.
I then created a template as described here:
The item prototype looks like this:
When testing the item prototype I now get the following error:

What am I doing wrong?
Thanks in advance,
nik-k
I'm trying to process the following JSON return with Zabbix:
Example response:
Code:
[
{
"id":"mow.DE-BY-AB-W169-20231019-001",
"payload":{
"version":5,
"type":"ALERT",
"id":"mow.DE-BY-AB-W169-20231019-001",
"hash":"2e7a0bfa5bf2a480521b79f272e1d134336fedbe5367fac145378d15fb4f3cef",
"data":{
"headline":"Trinkwasser-Verunreinigung - Mönchberg",
"provider":"MOWAS",
"severity":"Severe",
"urgency":"Immediate",
"msgType":"Update",
"transKeys":{
"event":"BBK-EVC-045"
},
"area":{
"type":"ZGEM",
"data":"8786,100001"
},
"valid":true
}
},
"i18nTitle":{
"de":"Trinkwasser-Verunreinigung - Mönchberg"
},
"sent":"2023-10-19T18:20:53+02:00"
},
{
"id":"mow.DE-BY-R-SE084-20231020-84-000",
"payload":{
"version":5,
"type":"ALERT",
"id":"mow.DE-BY-R-SE084-20231020-84-000",
"hash":"818682e7c089b229d81e08a5c2ba330659727ef187440c7e5cb5a55580d4eb1c",
"data":{
"headline":"Trinkwasser-Verunreinigung - Mönchberg",
"provider":"MOWAS",
"severity":"Severe",
"urgency":"Immediate",
"msgType":"Update",
"transKeys":{
"event":"BBK-EVC-045"
},
"area":{
"type":"ZGEM",
"data":"8786,100001"
},
"valid":true
}
},
"i18nTitle":{
"de":"Trinkwasser-Verunreinigung - Mönchberg"
},
"sent":"2023-10-20T13:24:07+02:00"
}
]
Unfortunately, an attempt to create a new item fails when I select JSON Data:
I can only create the item if I select Raw Data.
I then created a template as described here:
The item prototype looks like this:
Code:
$..[?(@.id == "{#NINAWARNING}")].payload.data
What am I doing wrong?
Thanks in advance,
nik-k
Comment