steveberl - I'm having a lot of problems trying...
I'm having a lot of problems trying to get grafana to talk to influxdbv2 on a new system I am putting together. Installed everything fresh. Using the influxdbv2 web GUI I can see my data getting put into the DB. But I can't seem to get grafana (running on the same RPi as signalk and influxdb) to talk to this influxdb instance. I seem to get:
14 Replies
from memory, if its V2 it uses a token? or similar for grafana to access influx.
(V1 uses the more conventional user credentials)
there is a good tutorial here… you need to find the relevant sections. (grafana and influxdb 2)
https://www.reddit.com/r/homeassistant/comments/oje65v/home_assitant_with_grafana_and_influxdb_2x_basic/
Almost the same as what I did. I created an "all access token" in influxdb, and pasted that into the token field in my grafana data source. I turned off "Basic Auth" and switch the query language to "flux". Now I get a different error: "unauthorized: unauthorized access error reading buckets". The bucket and organization names match. I'm stumped. Maybe it will make more sense in the morning.
On difference in the setup instructions is that @tkurki says I need an custom http header called "Authorization", which I did. The instructions in the reddit article don't seem to require that.
i confess.. i couldn’t get it working .. for much the same reason… .. and went back to influx V1,
for which i has been using successfully for 3 years…. and i had an existing “white list” … which helps reduce the size of database and load..
(rather than saving “all” my paths ) ..
Got it to work! I took away the "Authorization" custom HTTP header and all is well. Seems a documentation bug in https://github.com/tkurki/signalk-to-influxdb2/blob/main/README.md
coool… did you do a documentation update to the readme.. (last time i found something similar , tepoo said, pls mod the doc )
hmm. @Matti Airas i think the section about Configuring the Grafana Data Source is specifically about using Grafana's Influxdb v1 datasource (that uses influxql, not flux) against an InfluxDb v2 server? only the text never mentions this anywhere 🤦♂️
If that’s the case I can do a PR. There should be 2 sections in the document for v1 vs v2.
Yes, that's true - probably should be mentioned. For the public record, I adapted the README text from the instructions I wrote for HALPI: https://docs.hatlabs.fi/halpi/docs/software/
I just tested the README instructions, and they're still valid. There are a couple of places that could be clearer, though. First, initial InfluxDB configuration should probably be discussed (as I did in the original text), and the custom HTTP header is easy to get wrong. The value needs to be like
Token y0uR5uP3rSecr3tT0k3n
, meaning that the word "Token" needs to be there.HALPI: Hat Labs Raspberry Pi Boat Computer
Software
Introduction HALPI is a general-purpose computer that comes preinstalled with OpenPlotter 4, a custom distribution of Raspberry Pi OS with a number of pre-installed applications and services. Documentation for each software component is provided by their respective projects:
Raspberry Pi OS: Raspberry Pi OS Documentation OpenPlotter: OpenPlotter...
FWIW, I personally have a strong preference for InfluxQL. Granafa has much better integration with it (no need to manually write the queries, you can click through the UI), and Flux is already deprecated.
This is from a year ago: https://community.influxdata.com/t/is-flux-being-deprecated-with-influxdb-3-0/30992
InfluxData Community Forums
Is Flux being deprecated with InfluxDB 3.0?
InfluxDB 3.0 sure sounds like it’s going to provide a lot of performance improvements, and our team is interested in upgrading from 2.x. But we now have a lot of Grafana dashboards and custom query tooling that is all written in Flux, and all the documentation I see (including the new python influx3 client library) seems to have gone back to Inf...
@mairas is this correct? https://github.com/tkurki/signalk-to-influxdb2/pull/69
GitHub
doc: update Grafana instructions by tkurki · Pull Request #69 · tku...
Add note about InfluxDb version. Add details about the Authorization header.
@steveberl did you see my PR comment? Can’t replicate what u have