grafana / influxdb-flux-datasource

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

InfluxDB 1.8 does no longer work since updating to grafana and plugin to 7.0 #101

Closed disaster123 closed 4 years ago

disaster123 commented 4 years ago

While using this with Grafana 6 worked fine. It stopped working with Grafana 7 and plugin version 7.

Setting up the plugin now always fails with:

500 Internal Server Error: {"error":"panic: column retentionPeriod:int is not of type string"}
lephisto commented 4 years ago

Got the same issue, can't connect to the flux endpoint of a v1.x Influxdb.

ryantxu commented 4 years ago

Which version of influx? This is expected to work with 1.8+ and 2.0 https://github.com/influxdata/influxdb-client-go#influxdb-18-api-compatibility

disaster123 commented 4 years ago

Influx 1.8.0 here old plugin version works fine even with Grafana 7

dsantaolalla commented 4 years ago

I have the same problem,

500 Internal Server Error: {"error":"panic: column retentionPeriod:int is not of type string"}

When using the following versions:

Grafana 7.0.0 Influxdb 1.8.0 influxdb-flux-datasource plugin 7.0.0

As a note, If I downgrade Influxdb and the plugin versions, works fine, the following combination:

Grafana 7.0.0 Influxdb 1.7.8 influxdb-flux-datasource plugin 5.4.1

agolovenko commented 4 years ago

same here

germm commented 4 years ago

i have the same problem

jesjimher commented 4 years ago

Same problem, flux doesn't work since update to v7, giving the same error.

ext452 commented 4 years ago

same problem :( grafana 7.0 influxdb 1.8.0 influxdb-flux-datasource plugin 7.0.0

easthy-alterpost commented 4 years ago

The same problem: influxdb-1.8.0.x86_64 grafana-7.0.0-1.x86_64 Flux (InfluxDB) [BETA] v.7.0.0

andig commented 4 years ago

Sorry for the confusion. Same problem with #107

Working: Grafana 6.4 Flux 5.4.1

Broken: Grafana 7.0 Flux 7.0

Both running against InfluxDB 1.8.4 1.8.0

andig commented 4 years ago

I'm seeing this in the influxdb (v1.8.4 v1.8.0) logfile:

[httpd] 172.22.0.1 - - [02/Jun/2020:11:46:29 +0000] "GET /health HTTP/1.1" 200 106 "-" "influxdb-client-go/1.1.0  (linux; amd64)" b284b207-a4c6-11ea-859b-0242ac160002 21098
ts=2020-06-02T11:46:29.696143Z lvl=info msg="Execute source panic" log_id=0N0wkt60000 error="panic: column retentionPeriod:int is not of type string"

I cannot find the "Execute source panic" in either influxdb (1.8 branch), influxdb-client-go (master) nor grafana's influxdb-flux-datasource (master).

andig commented 4 years ago

The actual error message is in https://github.com/influxdata/influxdb/blob/1.8/patches/flux.patch#L1816 and has since been removed.

/cc @jsternberg who has upgraded flux in https://github.com/influxdata/influxdb/commit/636a27e77f00f0faeff186c8b6b005d79da7c424

scurvy-dog commented 4 years ago

Encountered the same error today when setting up a Flux datasource today. Datasource works fine in Chronograf with specifying the influx host with no authentication.

Grafana 7.0.1 Influx 1.8 Flux 7.0

andig commented 4 years ago

ping @jsternberg- this is still an issue:

Screenshot 2020-06-13 at 12 09 02
korre73 commented 4 years ago

Same Problem on

Grafana 7.0.3 Influx 1.8.0 Flux 7.0

The Topic there "old Version works" means Flux 5.4.1 ???

How can i downgrade to this version????

dsantaolalla commented 4 years ago

@korre73 you can downgrade with running the following where your grafana is running:

Uninstall first: grafana-cli plugins uninstall grafana-influxdb-flux-datasource

Then install the specific version 5.4.1 grafana-cli plugins install grafana-influxdb-flux-datasource 5.4.1

jesjimher commented 4 years ago

But will old version work with Grafana 7? Plugin documentation seems to state that latest works with Grafana 7, and 5.4.1 works with Grafana 6.

disaster123 commented 4 years ago

Yes it does i'm stil using 5.4.1 since weeks with grafana 7

andig commented 4 years ago

I have given up on waiting for feedback and reverted to grafana 6.7.4 as 7.0.4 fix flux has become totally useless for me.

lephisto commented 4 years ago

Still not working with Grafana 7.1... are there any intentions to get Flux working again? I'm stuck with 6.7.4 on projects that require fluxlang..

dswarbrick commented 4 years ago

@lephisto Grafana 7.1 has support for Flux built-in. This plugin is essentially obsolete now (for users of Grafana 7.1+).

When setting up an InfluxDB data source, you now have the option to specify InfluxQL or Flux query language.

Note: I found that I had to specify an Organization, despite the docs suggesting that it's not necessary with InfluxDB 1.8. It seems that it was more to make Grafana happy, than InfluxDB.

CharlesGodwin commented 4 years ago

@dswarbrick can you send me a creen shot of the config for a FLUX and influxdb 1.8 setup. I can't get mine to work. thanks

an example URL, organiziation (how do I get that?) and Token

ryantxu commented 4 years ago

Check: https://www.influxdata.com/blog/how-grafana-dashboard-influxdb-flux-influxql/

it looks like you need an empty org

dswarbrick commented 4 years ago

@CharlesGodwin The organization can be whatever - ACME Widgets, Inc., if you like.

The token is simply the concatenation of the InfluxDB 1.8 username and password, with a colon between, e.g. grafana:secretpw

CharlesGodwin commented 4 years ago

Of course, that was intuitively obvious.

From: Daniel Swarbrick notifications@github.com Sent: July 16, 2020 18:40 To: grafana/influxdb-flux-datasource influxdb-flux-datasource@noreply.github.com Cc: Charles W Godwin charles@godwin.ca; Mention mention@noreply.github.com Subject: Re: [grafana/influxdb-flux-datasource] InfluxDB 1.8 does no longer work since updating to grafana and plugin to 7.0 (#101)

@CharlesGodwinhttps://github.com/CharlesGodwin The organization can be whatever - ACME Widgets, Inc., if you like.

The token is simply the concatenation of the InfluxDB 1.8 username and password, with a colon between, e.g. grafana:secretpw

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/grafana/influxdb-flux-datasource/issues/101#issuecomment-659713978, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6AIH7M6Y226KRVSCFWBLLR356TJANCNFSM4NFZ7VIQ.

timhallinflux commented 4 years ago

Now that Grafana 7.1 is out, the updated InfluxDB data source is much more straightforward to use and there is supporting documentation on the Grafana site and InfluxDB site as well. Let us know if there are still outstanding issues.

andig commented 4 years ago

Let us know if there are still outstanding issues.

@timhallinflux using 7.1 against Influx 1.8 datasource definition fails unless you define an organisation. Its also not obvious you need to define token as user:password. Both are without useful error message in the ui.

jesjimher commented 4 years ago

@timhallinflux using 7.1 against Influx 1.8 datasource definition fails unless you define an organisation. Its also not obvious you need to define token as user:password. Both are without useful error message in the ui.

In my case, it works just entering a random text as an organisation. Token may be left blank too, once you click Save/test it gets filled automatically.

ryantxu commented 4 years ago

See https://github.com/grafana/grafana/issues/26397

random text in the org will work. We will improve that soon