Influxv2 and grafana multivalue

I am using influxv2. In grafana I have a host variable which can do ‘all’ or ‘multiselect’. If I select one host it works however, when I select more than 1 host it doesn’t work


filter (fn: (r) => r[“host”] == “host1”

but how can I select multiple hosts for the query?

You need to use a Regex and pipe operator (no idea why this is the case).

|> filter(fn: (r) => r["host"] =~ /${YourVariableHere:pipe}/)


oh thanks. what is “pipe” ?