grafana / influxdb-flux-datasource

Grafana datasource plugin for Flux (InfluxDB)
Apache License 2.0
51 stars 21 forks source link

Metric request error #128

Open mroe1234 opened 3 years ago

mroe1234 commented 3 years ago

It seems like a few issues with similar reports are already open, I didn't want to assume my problem is the same as others. Here is the relevant information.

Grafana: 7.2.1 Influx: 1.8.3

flux query:

from(bucket: "ntopng/autogen")
    |> range(start: -6h)
    |> filter(fn: (r) => r._measurement == "host:traffic" and (r._field == "bytes_rcvd") and (r.ifid == "19"))
    |> difference(nonNegative: true)   
    |> sum()   
    |> group()   
    |> top(n:10)  
    |> duplicate(column: "host", as: "_field")   
    |> group(columns: ["_field"])   
    |> drop(columns: ["_measurement","ifid", "host"]) 

This returns data using the influx-cli but returns this error in grafana:

status:500
statusText:"Internal Server Error"
data:Object
    message:"Metric request error"
config:Object
    url:"api/ds/query"
    method:"POST"
    data:Object
    requestId:"Q107"
    retry:0
    headers:Object
    hideFromInspector:false
message:"Metric request error"
hex0r commented 3 years ago

I have the same issue since 7.x, as many others today i tested grafana_7.3.0~beta1 same issues as all other 7.x versions. (tested all :) ) Flux is not usable in grafana anymore. Simple queries work, all other either don't work or work sometimes (reload dashboard , edit dashboard ....)