grafana/pkg/tests/api/alerting
Matthew Jacobson ba3994d338
Alerting: Repurpose rule testing endpoint to return potential alerts (#69755)
* Alerting: Repurpose rule testing endpoint to return potential alerts

This feature replaces the existing no-longer in-use grafana ruler testing API endpoint /api/v1/rule/test/grafana. The new endpoint returns a list of potential alerts created by the given alert rule, including built-in + interpolated labels and annotations.

The key priority of this endpoint is that it is intended to be as true as possible to what would be generated by the ruler except that the resulting alerts are not filtered to only Resolved / Firing and ready to be sent.

This means that the endpoint will, among other things:

- Attach static annotations and labels from the rule configuration to the alert instances.
- Attach dynamic annotations from the datasource to the alert instances.
- Attach built-in labels and annotations created by the Grafana Ruler (such as alertname and grafana_folder) to the alert instances.
- Interpolate templated annotations / labels and accept allowed template functions.
2023-06-08 18:59:54 -04:00
..
api_admin_configuration_test.go Alerting: introduce AlertQuery in definitions package (#63825) 2023-03-27 11:55:13 -04:00
api_alertmanager_configuration_test.go Alerting: Template Testing API (#67450) 2023-04-28 15:56:59 +01:00
api_alertmanager_test.go Alerting: Repurpose rule testing endpoint to return potential alerts (#69755) 2023-06-08 18:59:54 -04:00
api_available_channel_test.go Chore: All tests under pkg/tests should be integration tests (#59521) 2022-12-09 08:11:56 +01:00
api_backtesting_data.json Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_backtesting_test.go Alerting: introduce AlertQuery in definitions package (#63825) 2023-03-27 11:55:13 -04:00
api_notification_channel_test.go Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622) 2023-04-25 13:39:46 -04:00
api_prometheus_test.go Alerting: Add limits and filters to Prometheus Rules API (#66627) 2023-04-17 17:45:06 +01:00
api_provisioning_test.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
api_ruler_test.go Alerting: Fix unique violation when updating rule group with title chains/cycles (#67868) 2023-06-08 18:51:50 -04:00
api_testing_test.go Alerting: Repurpose rule testing endpoint to return potential alerts (#69755) 2023-06-08 18:59:54 -04:00
testing.go Alerting: Repurpose rule testing endpoint to return potential alerts (#69755) 2023-06-08 18:59:54 -04:00