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

Add ability to set HttpHeaders via plugin options #626

Closed
adamyeats opened this issue Dec 8, 2023 Discussed in #625 · 7 comments
Closed

Add ability to set HttpHeaders via plugin options #626

adamyeats opened this issue Dec 8, 2023 Discussed in #625 · 7 comments
Labels

Comments

@adamyeats
Copy link
Contributor

Discussed in #625

Originally posted by ShravanSunder December 8, 2023
I wanted to use this with grafana cloud to view data in cloudflare analytics engine that uses clickhouse. https://developers.cloudflare.com/analytics/analytics-engine/grafana/

They need use to use authorisation header with https. How can this be done in this plug in?

If not can we request this feature?

@SpencerTorres
Copy link
Collaborator

This would be useful. Some questions:

  1. Are there any headers we would want to restrict adding? (Hop headers?)
  2. Should it be a generic input for an array of headers, or should we just add Authorization for now?
  3. Would any of these fields need to be stored securely? (Such as Authorization containing tokens)

@ShravanSunder
Copy link

@SpencerTorres this is the link to cloudflare's click house offering which would be great to connect to grafana: https://developers.cloudflare.com/analytics/analytics-engine/grafana/#grafana-plugin-setup

Configure the plugin as follows:

URL: https://api.cloudflare.com/client/v4/accounts/<account_id>/analytics_engine/sql. Replace <account_id> with your 32 character account ID (available in the Cloudflare dashboard).
Leave all auth settings off.
Add a custom header with a name of Authorization and value set to Bearer <token>. Replace <token> with suitable API token string (refer to the [SQL API docs](https://developers.cloudflare.com/analytics/analytics-engine/sql-api/#authentication) for more information on this).
No other options need to be set.

@ShravanSunder
Copy link

@adamyeats Any thoughts on when you would be able to support this. thanks :)

@adamyeats
Copy link
Contributor Author

@ShravanSunder See #633

@SpencerTorres
Copy link
Collaborator

As @adamyeats mentioned, we have a PR open to add this to the v4 branch in #633. v4 will be released soon but if you want to build your own branch asap, I recommend using my v4-fixes branch from #666 which includes the latest version of v4 (and includes the http header changes)

@ShravanSunder
Copy link

@SpencerTorres i'm attempting to use this with grafana cloud, so i'll wait for the PR to be merged :) thanks!

@SpencerTorres
Copy link
Collaborator

@ShravanSunder Hey! v4 is available now on the plugin catalog if you want to give it a go. I'm gonna close this issue now that the feature is available. Thanks!

@github-project-automation github-project-automation bot moved this from Incoming to Done in Partner Datasources Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants