How do I select from InfluxDB 2.0 the list of hosts?

I want to create a variable in grafana that displays a list with all the hosts using a query.

I used the following flux query, but with no results:

What should I put in the Query caset?

Additional info: if I put the same query in a Grafana panel, it displays the output:

I am using:
Influxdb version 2.0 beta
Telegraf version 1.14
Grafana version 7.05


I am having a similar problem since upgrading to Grafana 7.1 when looking for a set of tag values.

In Grafana 6.5 I used a query variable like this:

import "influxdata/influxdb/v1"

  bucket: "R757",
  measurement: "syslog",
  tag: "severity"

But in Grafana 7.1 I get an error:

Seems like a bug to me…