If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to REGISTER before you can post. To start viewing messages, select the forum that you want to visit from the selection below.

Discovery rules using HTTP agent problem

18-04-2019, 11:46

Hey guys,

I'm trying to monitor my spot instances using Zabbix's discovery rules.
I have a 4.2.0 server set up with a 4.2.0 agent on him.

I tried 2 things:
1. Sending the request directly through the discovery rule, setting it to HTTP agent, as a GET request type, with the correct headers and all.
When enabled, the status of the discovery rule will be set to "Not Supported" with an error "Cannot find the 'data' array in the received JSON object".

2. Setting up a regular item, HTTP Agent and GET request type, to get the text value from the request(tried with Convert to JSON on and off), then set up a discovery rule using dependent item on the master item.
When enabled, the discovery rule returns the same error.

In the documentation, it says:
"Note that since Zabbix 4.2, the format of the JSON returned by low-level discovery rules has been changed. It is no longer expected that the JSON will contain the "data" object. Low-level discovery will now accept a normal JSON containing an array, in order to support new features such as the item value preprocessing and custom paths to low-level discovery macro values in a JSON document."