instream
instream copied to clipboard
Supporting bucket and org
Hi 👋🏼
Thanks for all the effort maintaining this repo! I have a question about bucket
and org
support.
I've seen that in this commit support for bucket
and org
values was introduced.
However more recently, it has been removed the support in this commit.
Is this something that is work-in-progress, or is this something the library won't support?
Thanks!
Supporting InfluxDB v2 is still a work-in-progress with a lot of cleanup. And most likely more of these "look, something new... meh, remove it, seems to messy"-changes :D
But eventually there should be full support for InfluxDB v2 using bucket/org instead of the legacy dbrp wrapper.
@mneudert it's great to hear! I tried 3 Influx/Telegraf clients and only the Instream fit in our setup nicely! Please keep the great work up!
@mneudert let us know if you need help? The /v2 API isn't new. We've had it in market for 2 years.
Hey guys. How can I connect to influx 2.0?
I tried something like that without success.
token -> config :instream, DefaultConnection, auth: [method: :token, token: token], bucket: "test_database", org: "instream_test", loggers: [], version: :v2 end
%{code: "unauthorized", message: "unauthorized access"}
I am receiving the same error as @tiagodavi , is there a work around this, which might not have been documented?
If you are using a released version from Hex that would be expected as the v2 support is still unreleased.
You could integrate the current development version to connect:
# at the appropriate position in your mix.exs
{:instream, github: "mneudert/instream", ref: "e6765873e616ee95acf31ee6d0582c204a316f92"},
The code should not change much anymore except for lots of documentation cleanup.
But that is something I say to myself for nearly a year now and still don't have everything in a state I would call ready :sweat_smile: So no promises, only a suggestion to try it.
I try v2 with code on the master branch, but I keep getting {:error, :timeout}
with any query, any suggestion?
That is most likely the HTTP request taking more than 5 seconds (the default timeout). You could increase the timeout by passing a higher one to the query function:
MyConnection.query("--- query ---", http_opts: [recv_timeout: 30_000])
That would give you up to 30 seconds to get a response. If that solves your problem you can keep it as a query option or configure it as a default in your connection:
config :my_app, MyConnection,
http_opts: [recv_timeout: 30_000]
Thanks, but this one also didn't work.