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

Fill Labels attribute of a DataFrame Field. #391

Merged
merged 1 commit into from Dec 10, 2021

Conversation

stephan-hof
Copy link
Contributor

Hi, my goal is support for alerting on multiple series.

This issue has been reported in #362. See point two with the reference to grafana/grafana#7832

It appears that grafana uses the Labels of a Field within a DateFrame to distinguish/track the different alerts. Currently the clickhouse-grafana plugin leaves the Labels empty.
So grafana does not know how the multiple DataFrames differ and shows the following error instead:

invalid format of evaluation results for the alert definition: 
frame cannot uniquely be identified by its labels: has duplicate results with labels {}

In this pull request I fill the Labels attribute and now alerting of multiple series works as expected.
See the following screenshot. The important bit as at the end after the 'Preview Alerts'.
There is a list with the different series, based on the labels. Which means the grafana alert tracking looks at the different series independently.
new

Without this fix the alert would raise this error instead.
old

This adds support for alerts on multiple series.
@Slach Slach merged commit 40e4e33 into Altinity:master Dec 10, 2021
@Slach
Copy link
Collaborator

Slach commented Dec 10, 2021

thanks a lot for contributing

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 this pull request may close these issues.

None yet

3 participants