grafana / influxdb-flux-datasource

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

graph not compatible with those written in InfluxQL #110

Open cyanghsieh opened 4 years ago

cyanghsieh commented 4 years ago

Environment: Grafana 7.0 Flux[BETA] 7.0.0 InfluxDB 1.7.8

In InfluxQL I wrote:

SELECT value FROM myMeasurement WHERE $timeFilter

then get a complete graph

when I tried with FLUX:

from(bucket: "mydb/autogen")
  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)
  |> filter(fn: (r) => r._measurement == "myMeasurement")

I believe these two scripts will return same result, however in FLUX some data was missing. Also, in Chronograf it shows similar to those in InfluxQL

Here's how these 3 graphs looks:

InfluxQLvsFLUX.png Chronograf.png

cyanghsieh commented 4 years ago

I found that it's because the default "max data points". Please ignore this dumb question and sorry for the inconvenience.

ryantxu commented 4 years ago

It is caused by max datapoinys... So the query should likely included a group claues.

However grafana should make a more clear warning when it stops reading based on the maxdatapoints

lephisto commented 3 years ago

I think this is related to https://github.com/grafana/grafana/issues/26484