Hello,
I think I'm close to getting this to work.
We have a number of host devices (just Linux/Windows machines) that have a json file running on them show some data I need to monitor in Zabbix. I'm testing with just 1 host device at the moment.
The path to each device is like this:
I'm just concentrating on "screen_percentage_black" and trigger a warning if over 50
So I've created a template
A test works and can read the the json file:

Over to the discovery. I created a Dependent item and a key as devices.json.fetch
LLD:

Does my key look correct?

Pre-processing
I use:

Now if I go to a host where I've assigned this template to and test I get this error, I was hoping it would return a value of 25 as seen in the json:

Any help would be most appreciated. I think I'm close.
It seems to accept this though, but I can't seem to get a test trigger working.
Thanks
I think I'm close to getting this to work.
We have a number of host devices (just Linux/Windows machines) that have a json file running on them show some data I need to monitor in Zabbix. I'm testing with just 1 host device at the moment.
The path to each device is like this:
Code:
http://192.168.1.1/pod/v0/metrics.json
Code:
{
"screen_percentage_black": 25,
"screen_unexpected_size": 0,
}
So I've created a template
A test works and can read the the json file:
Over to the discovery. I created a Dependent item and a key as devices.json.fetch
LLD:
Does my key look correct?
Pre-processing
I use:
Code:
$[?(@.name == '{#HOST.NAME}')].screen_percentage_black.first()
Now if I go to a host where I've assigned this template to and test I get this error, I was hoping it would return a value of 25 as seen in the json:
Code:
cannot extract value from json by path "$[?(@.name == '{#HOST.NAME}')].screen_percentage_black.first()": invalid object format, expected opening character '{' or '[' at: '$[?(@.name == '{#HOST.NAME}')].screen_percentage_black.first()'

Any help would be most appreciated. I think I'm close.
It seems to accept this though, but I can't seem to get a test trigger working.
Code:
$['screen_percentage_black']
Comment