grafana/pkg/services/ngalert/api
Konrad Lalik 6992d17924
Alerting: Add support to distinguish Prometheus datasource subtypes (Mimir, Cortex and Vanilla Prometheus) (#46771)
* Add basic UI for custom ruler URL

* Add build info fetching for alerting data sources

* Add keeping data sources build info in the store

* Use data source build info to construct data source urls

* Remove unused code

* Add custom ruler support in prometheus api calls

* Migrate actions

* Use thunk condition to prevent multiple data source buildinfo fetches

* Unify prom and ruler rules loading

* Upgrade RuleEditor tests

* Upgrade RuleList tests

* Upgrade PanelAlertTab tests

* Upgrade actions tests

* Build info refactoring

* Get rid of lotex ruler support action

* Add prom ruler availability checking when the buildinfo is not available

* Add rulerUrlBuilder tests

* Improve prometheus data source validation, small build info refactoring

* Change prefix based on Prometheus subtype

* Use the correct path

* Revert config routing

* Add deprecation notice for /api/prom prefix

* Add tests to the datasource subtype

* Remove custom ruler support

* Remove deprecation notice

* Prevent fetching ruler rules when ruler api is not available

* Add build info tests

* Unify naming of ruler methods

* Fix test

* Change buildinfo data source validation

* Use strings for subtype params and unveil mimir

* organise imports

* frontend changes and wordsmithing

* fix test suite

* add a nicer verbose message for prometheus datasources

* detect Mimir datasource

* fix test

* fix buildinfo test for Mimir

* shrink vectors

* add some code documentation

* DRY prepareRulesFilterQueryParams

* clarify that Prometheus does not support managing rules

* Improve buildinfo error handling

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-04 18:30:17 +01:00
..
test-data Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) 2021-09-29 16:16:40 +02:00
tooling Alerting: Unify Swagger/OpenAPI generation tooling (#46928) 2022-03-31 09:34:46 +02:00
api_admin.go Alerting: send alerts to external, internal, or both alertmanagers (#40341) 2022-02-01 20:36:55 -03:00
api_alertmanager_test.go check that user is authorized to create\update silences (#47163) 2022-04-01 09:39:59 -04:00
api_alertmanager.go check that user is authorized to create\update silences (#47163) 2022-04-01 09:39:59 -04:00
api_prometheus_test_fixtures.go Alerting: Display query from grafana-managed alert rules on /api/v1/rules (#45969) 2022-03-14 10:39:20 +00:00
api_prometheus_test.go Alerting: Remove internal labels from prometheus compatible API responses (#46548) 2022-03-16 16:04:19 +00:00
api_prometheus.go Alerting: handle folder permissions when fine-grained access enabled (#47035) 2022-04-01 19:33:26 -04:00
api_ruler_test.go fix scope for datasource:query action (#46973) 2022-03-29 09:58:59 -04:00
api_ruler_validation_test.go Alerting: validate rules and calculate changes in API controller (#45072) 2022-02-23 11:30:04 -05:00
api_ruler_validation.go Alerting: validate rules and calculate changes in API controller (#45072) 2022-02-23 11:30:04 -05:00
api_ruler.go Alerting: handle folder permissions when fine-grained access enabled (#47035) 2022-04-01 19:33:26 -04:00
api_testing_test.go Alerting: update rule test endpoints to respect data source permissions (#47169) 2022-04-02 02:00:23 +02:00
api_testing.go Alerting: update rule test endpoints to respect data source permissions (#47169) 2022-04-02 02:00:23 +02:00
api.go Alerting: update rule test endpoints to respect data source permissions (#47169) 2022-04-02 02:00:23 +02:00
authorization_test.go fix scope for datasource:query action (#46973) 2022-03-29 09:58:59 -04:00
authorization.go fix scope for datasource:query action (#46973) 2022-03-29 09:58:59 -04:00
fork_ruler.go Alerting: rules delete API to check data source authorization (#46906) 2022-03-25 12:39:24 -04:00
forked_admin.go Alerting: Split grafana and lotex routes (#44742) 2022-02-04 12:42:04 -05:00
forked_am.go Alerting: Split grafana and lotex routes (#44742) 2022-02-04 12:42:04 -05:00
forked_prom.go Alerting: Split grafana and lotex routes (#44742) 2022-02-04 12:42:04 -05:00
forked_testing.go Alerting: Split grafana and lotex routes (#44742) 2022-02-04 12:42:04 -05:00
generated_base_api_alertmanager.go Alerting: update authorization logic to use proper legacy roles when fine-grained access is disabled (#46931) 2022-03-24 17:13:47 -04:00
generated_base_api_configuration.go Alerting: update authorization logic to use proper legacy roles when fine-grained access is disabled (#46931) 2022-03-24 17:13:47 -04:00
generated_base_api_prometheus.go Alerting: update authorization logic to use proper legacy roles when fine-grained access is disabled (#46931) 2022-03-24 17:13:47 -04:00
generated_base_api_ruler.go Alerting: update authorization logic to use proper legacy roles when fine-grained access is disabled (#46931) 2022-03-24 17:13:47 -04:00
generated_base_api_testing.go Alerting: update authorization logic to use proper legacy roles when fine-grained access is disabled (#46931) 2022-03-24 17:13:47 -04:00
lotex_am.go Remove Macaron ParamsInt64 function from code base (#43810) 2022-01-15 00:55:57 +08:00
lotex_prom.go Remove Macaron ParamsInt64 function from code base (#43810) 2022-01-15 00:55:57 +08:00
lotex_ruler_test.go Alerting: Add support to distinguish Prometheus datasource subtypes (Mimir, Cortex and Vanilla Prometheus) (#46771) 2022-04-04 18:30:17 +01:00
lotex_ruler.go Alerting: Add support to distinguish Prometheus datasource subtypes (Mimir, Cortex and Vanilla Prometheus) (#46771) 2022-04-04 18:30:17 +01:00
promql_compat_test.go Alerting/testing promql extraction (#34665) 2021-05-25 11:54:50 -04:00
promql_compat.go Alerting: check upstream response content type in lotex proxy (#34760) 2021-05-27 14:12:29 +03:00
testing.go Alerting: Display query from grafana-managed alert rules on /api/v1/rules (#45969) 2022-03-14 10:39:20 +00:00
util_test.go [Alerting]: implement backend checking for forking to Lotex ruler (#32208) 2021-03-23 18:08:57 +02:00
util.go Alerting: update rule test endpoints to respect data source permissions (#47169) 2022-04-02 02:00:23 +02:00