The discovery does not just look a bit like an item in the frontend; it also operates in the same way underneath. The magic happens based on the content of a specific item value. All the things that are discovered are encoded in a JSON structure. The easiest way to see what's returned is to use zabbix_get and query a Zabbix agent. On A test host, run the following command:
$ zabbix_get -s 127.0.0.1 -k net.if.discovery
Here, net.if.discovery is just an item key, not different from other item keys. This will return a small string, similar to the following:
{data:[{{#IFNAME}:enp0s3},{{#IFNAME}:enp0s8},{{#IFNAME}:lo}]}
While it's mostly understandable, it would be even better with some formatting. The easiest ...