grafana/pkg/services/ngalert/api
Matthew Jacobson 32f06c6d9c
Alerting: Receiver API complete core implementation (#91738)
* Replace global authz abstraction with one compatible with uid scope

* Replace GettableApiReceiver with models.Receiver in receiver_svc

* GrafanaIntegrationConfig -> models.Integration

* Implement Create/Update methods

* Add optimistic concurrency to receiver API

* Add scope to ReceiversRead & ReceiversReadSecrets

migrates existing permissions to include implicit global scope

* Add receiver create, update, delete actions

* Check if receiver is used by rules before delete

* On receiver name change update in routes and notification settings

* Improve errors

* Linting

* Include read permissions are requirements for create/update/delete

* Alias ngalert/models to ngmodels to differentiate from v0alpha1 model

* Ensure integration UIDs are valid, unique, and generated if empty

* Validate integration settings on create/update

* Leverage UidToName to GetReceiver instead of GetReceivers

* Remove some unnecessary uses of simplejson

* alerting.notifications.receiver -> alerting.notifications.receivers

* validator -> provenanceValidator

* Only validate the modified receiver

stops existing invalid receivers from preventing modification of a valid
receiver.

* Improve error in Integration.Encrypt

* Remove scope from alert.notifications.receivers:create

* Add todos for receiver renaming

* Use receiverAC precondition checks in k8s api

* Linting

* Optional optimistic concurrency for delete

* make update-workspace

* More specific auth checks in k8s authorize.go

* Add debug log when delete optimistic concurrency is skipped

* Improve error message on authorizer.DecisionDeny

* Keep error for non-forbidden errutil errors
2024-08-26 10:47:53 -04:00
..
hcl Alerting: Export of alert rules in HCL format (#73166) 2023-09-11 11:48:23 -04:00
test-data Alerting: Fix recording rule export (#91405) 2024-08-22 09:04:21 -04:00
tooling OpenAPI: Fix ValidationError message attribute (#90846) 2024-08-26 10:05:37 -04:00
api_alertmanager_guards_test.go fix(alerting): add a proper compare func for location in mute timings (#82153) 2024-02-08 13:36:09 +01:00
api_alertmanager_guards.go fix(alerting): add a proper compare func for location in mute timings (#82153) 2024-02-08 13:36:09 +01:00
api_alertmanager_silences_test.go Alerting: Hook up GMA silence APIs to new authentication handler (#86625) 2024-05-03 15:32:30 -04:00
api_alertmanager_silences.go Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
api_alertmanager_test.go Alerting: Vendor in latest grafana/alerting package (#91786) 2024-08-12 15:37:15 +01:00
api_alertmanager.go Alerting: Vendor in latest grafana/alerting package (#91786) 2024-08-12 15:37:15 +01:00
api_configuration_test.go Alerting: Feature toggle to disallow sending alerts externally (#87982) 2024-05-23 14:29:19 +02:00
api_configuration.go Alerting: Feature toggle to disallow sending alerts externally (#87982) 2024-05-23 14:29:19 +02:00
api_notifications_test.go Alerting: Receiver API complete core implementation (#91738) 2024-08-26 10:47:53 -04:00
api_notifications.go Alerting: Receiver API complete core implementation (#91738) 2024-08-26 10:47:53 -04:00
api_prometheus_test_fixtures.go Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_prometheus_test.go Alerting: Fix stale values associated with states that have gone to NoData, unify values calculation (#89807) 2024-07-08 12:30:23 -05:00
api_prometheus.go Alerting: Reduce cyclomatic complexity of PrepareRuleGroupStatuses (#89649) 2024-06-26 10:21:37 +02:00
api_provisioning_test.go Alerting: Receiver API complete core implementation (#91738) 2024-08-26 10:47:53 -04:00
api_provisioning.go Alerting: Add Create and Update methods to Template service (#91981) 2024-08-20 15:23:01 -04:00
api_ruler_export_test.go Alerting: Export and provisioning rules into subfolders (#77450) 2024-05-31 11:09:20 +03:00
api_ruler_export.go Alerting: Export and provisioning rules into subfolders (#77450) 2024-05-31 11:09:20 +03:00
api_ruler_history.go Identity: Unfurl OrgID in pkg/services to allow using identity.Requester interface (#76113) 2023-10-09 10:40:19 +02:00
api_ruler_test.go Alerting: Fix recording rule export (#91405) 2024-08-22 09:04:21 -04:00
api_ruler_validation_test.go Alerting: Add recording rules to ruler API and validation (#87779) 2024-05-21 14:39:28 -05:00
api_ruler_validation.go Alerting: Add recording rules to ruler API and validation (#87779) 2024-05-21 14:39:28 -05:00
api_ruler.go Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
api_testing_test.go Alerting: Refactor Alert Rule Generators (#86813) 2024-04-29 21:52:15 -04:00
api_testing.go Alerting: Send information about alert rule to data source in headers (#90344) 2024-07-17 22:55:12 +03:00
api.go Alerting: Detach condition validator from condition evaluator (#91150) 2024-07-30 10:55:37 -05:00
authorization_test.go Alerting: Get grafana-managed alert rule by UID (#86845) 2024-05-02 15:24:59 +01:00
authorization.go Alerting: Receiver API complete core implementation (#91738) 2024-08-26 10:47:53 -04:00
compat_contact_points_test.go Alerting: Support AWS SNS integration in Grafana (#88867) 2024-06-07 11:49:49 -04:00
compat_contact_points.go Alerting: Add MQTT notifications receiver (#91487) 2024-08-22 16:47:48 +02:00
compat_silences.go Alerting: Add optional metadata via query param to silence GET requests (#88000) 2024-05-30 12:04:47 -04:00
compat_test.go Alerting: introduce AlertQuery in definitions package (#63825) 2023-03-27 11:55:13 -04:00
compat.go Alerting: Receiver API complete core implementation (#91738) 2024-08-26 10:47:53 -04:00
configuration.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
errors.go Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
forking_alertmanager.go Alerting: Template Testing API (#67450) 2023-04-28 15:56:59 +01:00
forking_prometheus.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
forking_ruler.go Alerting: Get grafana-managed alert rule by UID (#86845) 2024-05-02 15:24:59 +01:00
generated_base_api_alertmanager.go instrumentation: change slogroup for alerting handlers to high-slow (#75460) 2023-09-29 14:56:48 +02:00
generated_base_api_configuration.go instrumentation: change slogroup for alerting handlers to high-slow (#75460) 2023-09-29 14:56:48 +02:00
generated_base_api_history.go instrumentation: change slogroup for alerting handlers to high-slow (#75460) 2023-09-29 14:56:48 +02:00
generated_base_api_notifications.go Alerting: Receivers API (read only endpoints) (#81751) 2024-02-05 20:12:15 +02:00
generated_base_api_prometheus.go instrumentation: change slogroup for alerting handlers to high-slow (#75460) 2023-09-29 14:56:48 +02:00
generated_base_api_provisioning.go Alerting: Support deleting rule groups in the provisioning API (#83514) 2024-02-28 10:19:02 -05:00
generated_base_api_ruler.go Alerting: Get grafana-managed alert rule by UID (#86845) 2024-05-02 15:24:59 +01:00
generated_base_api_testing.go instrumentation: change slogroup for alerting handlers to high-slow (#75460) 2023-09-29 14:56:48 +02:00
hooks_test.go Alerting: Use mux router to match hooks, add support for path variables and methods (#79345) 2023-12-12 14:43:11 -06:00
hooks.go Alerting: Use mux router to match hooks, add support for path variables and methods (#79345) 2023-12-12 14:43:11 -06:00
lotex_am.go Caching: Refactor enterprise query caching middleware to a wire service (#65616) 2023-04-12 12:30:33 -04:00
lotex_prom.go Caching: Refactor enterprise query caching middleware to a wire service (#65616) 2023-04-12 12:30:33 -04:00
lotex_ruler_test.go Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
lotex_ruler.go Alerting: Handle namespace and group query string params in Ruler API (#91533) 2024-08-13 08:31:07 +02:00
notifications.go Alerting: Receivers API (read only endpoints) (#81751) 2024-02-05 20:12:15 +02:00
persist.go Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
promql_compat_test.go Alerting: Update prometheus version (#65688) 2023-03-31 16:34:35 +02:00
promql_compat.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
provisioning.go Alerting: Support deleting rule groups in the provisioning API (#83514) 2024-02-28 10:19:02 -05:00
ruler_history.go Alerting: Add endpoint for querying state history (#62166) 2023-02-02 11:34:00 -06:00
testing_api.go Alerting: Repurpose rule testing endpoint to return potential alerts (#69755) 2023-06-08 18:59:54 -04:00
testing.go Alerting: Fix stale values associated with states that have gone to NoData, unify values calculation (#89807) 2024-07-08 12:30:23 -05:00
util_test.go Alerting: Refactor Alert Rule Generators (#86813) 2024-04-29 21:52:15 -04:00
util.go Chore: Bump Go to 1.23.0 (#92105) 2024-08-21 11:40:42 -04:00