Details used for creating connection string
Query Language: InfluxQL
URL: https://us-central1-1.gcp.cloud2.influxdata.com
Basic Auth
Username: xxxxx@gmail.clom
Password: I created a token and used it.
Forwarded OAuth
Error: BadRequest… Not sure what is wrong…
Appreciate all the help I can get…
Hello @proxybon for cloud2, the user in InfluxDB Details on the bottom should be id of the organisation. So for example, in my case (see below) it is bbefc202024380d0. And the database is the default bucket.
Would you try to switch User in BasicAuth to the users (your) email? And for password keep the generated token. I don’t think you need Custom HTTP Header. And then in InfluxDB details, database is the bucket’s name, user is the org id and password is the token.
Also, I tested/tried this based on this documentation directly from InfluxDB on API compatibility of InfluxDB2 with InfluxDB1: InfluxDB 1.x compatibility API | InfluxDB OSS 2.0 Documentation. Generally for cloud2, setting up with Flux is much easier and more straight forward, as you can see there clearly what is expected:
So just 1 last check if we have everything configured in the same way: Basic Auth: User: your user id (but not the id number, the user id name) that you can find in /about Password: active token created in load-data/tokens that has access to specified bucket
InfluxDB Details: Database:name of you InfluxDB bucket that you want to use in load-data/buckets. Keep in mind, provided token has to have read access to that bucket. User:org id that can be found in /about Password: active token created in load-data/tokens that has access to bucket
Oh yeah! That’s good! So there is 1 last thing we need to do and then it is going to work. In InfluxDB2 we have buckets. In influxDB1 it is databases. You can learn more here:
So to be able to query buckets, you have to map unmapped buckets:
For Authorization header, it needs to have word “Token” in front of it. Sorry I missed it in my example above (I have added it now, so if anyone is looking to do the same, there is complete info).
so something like --header "Authorization: Token hXzWOGsHXW6uM0NdsnksnqDjtPzdmldmlwJUZ4G-LDsLXJ1y1twpE1LS,mdlmdsLkcA==" \
@proxybon I have written down this blog post on Setting up InfluxDB v2 (Flux) with InfluxQL in Grafana and while working on it, I’ve learned that you actually just need to fill out Database - default_bucket and Password - token fields and it should still work without any problems. So no username, company id and tokens added multiple times are necessary. Sorry for overcomplicating my advice, but that’s how I had it before I started to document it in blog post.