Skip to content
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

Preserve custom query parameters in influxdb_v2 output #15474

Closed
glinton opened this issue Jun 7, 2024 · 0 comments · Fixed by #15475
Closed

Preserve custom query parameters in influxdb_v2 output #15474

glinton opened this issue Jun 7, 2024 · 0 comments · Fixed by #15475
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@glinton
Copy link
Contributor

glinton commented Jun 7, 2024

Use Case

Set a custom query parameter in a url:

[[outputs.influxdb_v2]]
  urls = ["http://127.0.0.1:8086?id=abc"]

Expected behavior

I expect the query parameter to be preserved at the destination.
/api/v2/write?id=abc&bucket=bkt&org=org

Actual behavior

Only the bucket/org parameters are set.
/api/v2/write?bucket=bkt&org=org

Additional info

Modifying this line to instead initialize params with the values from the URL (loc) should preserve the parameters while still ensuring bucket and org are set properly.

params := url.Values{}

-       params := url.Values{}
+       params := loc.Query()
@glinton glinton added the feature request Requests for new plugin and for new features to existing plugins label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant