-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding URL prefix to client #149
Comments
@johnseekins, thanks for posting the issue. Unfortunately, can confirm this a regression bug introduced in v1.1.0. If you use the client to write and query only, you can work around this by downgrading to v1.0.0 |
Downgrading to 1.0.0 I still see this error. (A bit of proof I am actually using 1.0.0):
|
Have you tried the V1 client with URL without the trailing c, err := client.NewHTTPClient(client.HTTPConfig{
Addr: fmt.Sprintf("http://%v:%v/insert/0:0/influx", hostname, port),
}) |
Yes. That does work (although it has some huge memory leaks). I was hoping to use v2 'cause it seemed the more supported solution, but... |
And with the V2 client 1.0.0 you still see exactly the same error: |
Exactly the same error, yes. |
Oh no! I didn't test that correctly! |
Never mind. 1.0.0 works perfectly fine. Thanks for the help. |
fix: Allow connecting to a server on a URL path (#149)
I'm currently trying to use this client to write to a VictoriaMetrics instance. They say that v2 API calls work correctly (https://victoriametrics.github.io/Cluster-VictoriaMetrics.html#url-format), but every time I try to write using this client, it appears the client is ignoring the prefix I set.
For example, if I set
http://localhost:8480/insert/0:0/influx
as my serverUrl, this client appears to usehttp://localhost:8480/api/v2/write
instead ofhttp://localhost:8480/insert/0:0/influx/api/v2/write
as I would expect.Am I doing something wrong in the client? My actual instantiation:
The error I receive:
A similar error I received using the v1 client:
In this case, we can see it used the full path I had defined:
Which leads me to believe the client is stripping any url prefix.
The text was updated successfully, but these errors were encountered: