Query for Grafana Labs Dashboard not working

I am new to influxDB and Grafana - hence the probalby stupid questions.

Currently I am trying to get a Dashboard from Grafana Labs up and running ( QNAP Dashboard - Telegraf SNMP - InfluxDB | Grafana Labs).

I got the telegraf and the provided SNMP input up and running. So far so good - but the dashboard is just delivering error messages :frowning:

All the queries throw this error:
Status: 500. Message: InfluxDB returned error: error parsing query: found FROM, expected identifier, string, number, bool at line 1, char 9

As I am running a InfluxDB 1.8 version I had to activate Flux - which I have done via ENV variable in my InfluxDB container. I verified that it is really enable using influxd config.

This is the query the dashboard uses (copied from query analyzer in Gafana):

query:"from(bucket: v.defaultBucket)
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r[\"_measurement\"] == \"snmp.QNAP.enclosureTable\")
  |> filter(fn: (r) => r[\"_field\"] == \"enclosureSerialNum\" and  r[\"enclosureID\"] == \"0\")
  |> filter(fn: (r) => r[\"agent_host\"] =~ /()/)
  |> keep(columns: [\"enclosureModel\"])
  |> distinct(column: \"enclosureModel\")
  |> group() 
  |> last() 
  |> keep(columns: [\"_value\"]) 

Any ideas how I can get this dashboard up and running?

Hello @litronics,
Can you share a screenshot of what your query looks like? I just want to check that you’re not using quite literally:


But instead just:

from(bucket: "<name of bucket>"
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)

Are you in face using a variable v.defaultBucket for your bucket?
Are you able to query at all in InfluxDB with Flux?