Altinity / clickhouse-grafana

Altinity Grafana datasource plugin for ClickHouse®
MIT License
715 stars 120 forks source link

Configured custom headers not being used in Grafana managed alerts #483

Open johnspurlock opened 1 year ago

johnspurlock commented 1 year ago

Hi there, great plugin! I have a configured datasource that needs to specify a custom Authorization header. This is working well in multiple dashboards.

image

I'd like to use this datasource in Grafana's alert feature, but all queries fail! Seemingly not using the custom header for alerts.

image

Grafana v10.0.0 (81d85ce802) plugin version: 2.5.3

Slach commented 1 year ago

looks like bug in golang part of plugin

johnspurlock commented 1 year ago

Ah ok, thanks for taking a look

lopis commented 1 month ago

Hello. I've been running into this same issue. Did you ever find a workaround?

johnspurlock commented 1 month ago

No workaround in the plugin unfortunately - I ended up making a proxy datasource

Hoping to see this in the plugin at some point!

addshore commented 3 weeks ago

I also just experienced this issue on Grafana cloud while using this plugin to access data from Cloudflare worker analytics.

looks like bug in golang part of plugin

Got a pointer to where? :)

addshore commented 3 weeks ago

Aaah perhaps https://github.com/Altinity/clickhouse-grafana/blob/ab4ccd85bd01622cf405207cdb9625b2436cb180/pkg/datasource_settings.go#L12 relates to this

Headers on requests are currently set in this section https://github.com/Altinity/clickhouse-grafana/blob/ab4ccd85bd01622cf405207cdb9625b2436cb180/pkg/client.go#L61-L78

And I see nothing about custom headers there