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

clickhouse-grafana falls back to POST for alert queries #353

Closed
winofi opened this issue Jun 28, 2021 · 2 comments · Fixed by #387
Closed

clickhouse-grafana falls back to POST for alert queries #353

winofi opened this issue Jun 28, 2021 · 2 comments · Fixed by #387
Assignees
Milestone

Comments

@winofi
Copy link

winofi commented Jun 28, 2021

Database queries for grafana alerts seem to be send using HTTP POST even when usePost is set to false for the datasource. Symptoms are that the plots show data but alerts always fail.

Might be connected to to the hardcoded POST here: https://github.com/Vertamedia/clickhouse-grafana/blob/2f2d2e164848ac0c54d745ab8d7ec301dc2c948a/src/datasource.ts#L201 but I am not familiar with grafana internals.

Might also be the cause for #345 when GET is used and the server does not support POST.

Grafana: 8.0.2
Clickhouse-Grafana: 2.3.1

@Slach Slach self-assigned this Jun 28, 2021
@Slach
Copy link
Collaborator

Slach commented Jun 28, 2021

@winofi do you make SQL queries not directly to clickhouse-server?
Which proxy server do you use?

@winofi
Copy link
Author

winofi commented Jun 29, 2021

Sorry forgot to mention: there is a nginx proxy in front of the clickhouse server, which might block POST to enforce readonly access.

@Slach Slach added this to the 2.4.0 milestone Nov 17, 2021
Slach added a commit to Altinity/grafana-plugin-repository that referenced this issue Nov 29, 2021
# 2.4.0 (2021-11-29)

## Enhancement:
* Add support for Grafana 8.x unified alerts, fix Altinity/clickhouse-grafana#380
* Add TLS support for backend alerts part of plugin Altinity/clickhouse-grafana#356 (comment)
* Add $naturalTimeSeries macro, look details in https://github.com/Vertamedia/clickhouse-grafana/pull/89/files#diff-cd9133eda7b58ef9c9264190db4534a1be53216edbda9ac57256fbd800368c03R383-R412
* Update golang-plugin-sdk-go to latest version
* Properly format Value in Table format, look details Altinity/clickhouse-grafana#379
* Remove toDateTime64 casting for column when time column is already DateTime64 to improve performance. Change test to ensure the casting is removed from the query, fix Altinity/clickhouse-grafana#360
* implements `$timeFilter64ByColumn(column_name)` macro, fix Altinity/clickhouse-grafana#343

## Fixes:

* implements properly GET and POST support for alert queries, fix Altinity/clickhouse-grafana#353
* SQL syntax highlight now works always, fix Altinity/clickhouse-grafana#174, fix Altinity/clickhouse-grafana#381
* fix Altinity/clickhouse-grafana#376,
* fix negative behavior for $perSecondColumns Altinity/clickhouse-grafana#337
* fix Altinity/clickhouse-grafana#374, ignore `--` inside quotas as comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants