Alerting: Show alert rules from Amazon Managed Service for Prometheus for the Amazon Prometheus data source #94508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this feature?
The core Prometheus data source currently supports displaying alert rules that are created in Amazon Managed Service for Prometheus (later referred to as AMP) on the "Alert rules" page in Grafana. This PR is to add the same support for the Amazon Managed Service for Prometheus data source (later referred to as Amazon Prometheus DS).
For context, the Amazon Prometheus DS was split off from the core Prometheus data source. Since the new data source has a different data source id, it doesn't get recognized as a Prometheus data source, so this feature doesn't work when using the Amazon Prometheus DS.
Here's a screenshot showing the results of this PR. There is an Amazon Prometheus DS and a core Prometheus data source that have both been configured to connect to AMP. Both of the data sources now show the alert rules configured in the "Data source-managed" section of the "Alert rules" page.
Why do we need this feature?
The Amazon Prometheus DS should maintain feature parity with the core Prometheus data source for features that existed before the split.
Who is this feature for?
Users of the Amazon Prometheus DS
Which issue(s) does this PR fix?:
Fixes grafana/grafana-amazonprometheus-datasource#251
Special notes for your reviewer:
I have not added any tests yet because I wanted to get feedback on whether this approach is OK first.
Please check that: