Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@VikaCep
Copy link
Contributor

@VikaCep VikaCep commented Mar 7, 2023

What is this feature?

Adds support to filter rules by multiple datasources

Why do we need this feature?

Right now we can only filter by one datasource and this would be useful for users with several configured ones.

Who is this feature for?

All users.

Which issue(s) does this PR fix?:

Fixes #62969

Special notes for your reviewer:

image

image

2023-03-15 18 11 41

@VikaCep VikaCep added this to the 9.5.0 milestone Mar 7, 2023
@VikaCep VikaCep self-assigned this Mar 7, 2023
@VikaCep VikaCep force-pushed the alerting/filter-multiple-datasources branch 2 times, most recently from ea86713 to 9ef356e Compare March 13, 2023 15:31
@VikaCep VikaCep marked this pull request as ready for review March 14, 2023 13:24
@VikaCep VikaCep requested a review from a team March 14, 2023 13:24
@gillesdemey
Copy link
Contributor

gillesdemey commented Mar 14, 2023

I think one feature I'd love to see is dividing the list of options in the select component in 2 distinct groups:

Data sources that manage Alert rules and other data sources.

As a user I'd love to be able to quickly select from a set of data sources (Prometheus and Loki) that have Manage alerts via Alerting UI turned on.

react-select does seem to support Grouped drop-down content and since MultiSelect is a wrapper component it should work.

@VikaCep VikaCep force-pushed the alerting/filter-multiple-datasources branch from 9842a58 to 2a104fe Compare March 15, 2023 20:03
@VikaCep
Copy link
Contributor Author

VikaCep commented Mar 15, 2023

@gillesdemey I've implemented a grouped version of it, let me know if this looks better, thanks! 🙏

image

@VikaCep VikaCep requested a review from gillesdemey March 15, 2023 21:14
@gillesdemey
Copy link
Contributor

That looks amazing! 🤩 Tagging @brendamuir here to refine the wording / terminology here a bit.

@brendamuir
Copy link
Contributor

Hey-what does "data sources that manage alert rules mean" and how are they different to "other data sources"?

@brendamuir
Copy link
Contributor

Data sources that manage alert rules.
Other data sources.
--> some typo/caps changes in there. I'd like to fully understand what it means before making a real call-but don't want to block if this needs merging asap.

@VikaCep
Copy link
Contributor Author

VikaCep commented Mar 17, 2023

I'm sure @gillesdemey can explain this better, but from what I can tell the difference resides on whether the "Manage alerts via the Alerting UI" setting in the admin section of the datasource is turned on or off

image

So basically the datasources that don't have the option turned on are listed under "Other datasources" and the difference is they don't manage alerts from within Grafana. I believe only Prometheus and Loki will fall under the first category as those are the ones that we support.

Copy link
Contributor

@gillesdemey gillesdemey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and implementation are ready to 🚀

@VikaCep
Copy link
Contributor Author

VikaCep commented Mar 20, 2023

--> some typo/caps changes in there. I'd like to fully understand what it means before making a real call-but don't want to block if this needs merging asap.

@brendamuir I can wait for your input before merging, let me know if you need extra clarification, thank you!!

@VikaCep VikaCep requested a review from gillesdemey March 22, 2023 13:09
@VikaCep
Copy link
Contributor Author

VikaCep commented Mar 22, 2023

I've updated the texts according to our conversation in Slack. Please let me know if it looks better now, thank you!

@VikaCep VikaCep modified the milestone: 9.5.0 Mar 22, 2023
@VikaCep VikaCep added no-backport Skip backport of PR and removed no-backport Skip backport of PR labels Mar 22, 2023
@VikaCep VikaCep merged commit 43bbe56 into main Mar 22, 2023
@VikaCep VikaCep deleted the alerting/filter-multiple-datasources branch March 22, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Alerting: allow selecting multiple datasource filters

4 participants