From 14a05193381aa36d9d0a071bbf52af156d2d241a Mon Sep 17 00:00:00 2001 From: gotjosh Date: Tue, 24 Aug 2021 18:11:28 +0100 Subject: [PATCH] Alerting: Remove Multiorg alertmangaer from the top-level services (#38506) Removes the registration of the multi-org alertmanager, it is started as a subservice of ngalerting. --- pkg/api/api.go | 2 +- pkg/api/http_server.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/api/api.go b/pkg/api/api.go index ce453d0e646..d5b4da005f0 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -385,7 +385,7 @@ func (hs *HTTPServer) registerRoutes() { }) apiRoute.Get("/alert-notifiers", reqEditorRole, routing.Wrap( - GetAlertNotifiers(hs.MultiOrgAlertmanager != nil && hs.Cfg.IsNgAlertEnabled())), + GetAlertNotifiers(hs.Cfg.IsNgAlertEnabled())), ) apiRoute.Group("/alert-notifications", func(alertNotifications routing.RouteRegister) { diff --git a/pkg/api/http_server.go b/pkg/api/http_server.go index 75a576bdfab..58862e989cd 100644 --- a/pkg/api/http_server.go +++ b/pkg/api/http_server.go @@ -42,7 +42,6 @@ import ( "github.com/grafana/grafana/pkg/services/live" "github.com/grafana/grafana/pkg/services/live/pushhttp" "github.com/grafana/grafana/pkg/services/login" - "github.com/grafana/grafana/pkg/services/ngalert/notifier" "github.com/grafana/grafana/pkg/services/provisioning" "github.com/grafana/grafana/pkg/services/quota" "github.com/grafana/grafana/pkg/services/rendering" @@ -104,7 +103,6 @@ type HTTPServer struct { PluginDashboardService *plugindashboards.Service `inject:""` AlertEngine *alerting.AlertEngine `inject:""` LoadSchemaService *schemaloader.SchemaLoaderService `inject:""` - MultiOrgAlertmanager *notifier.MultiOrgAlertmanager `inject:""` LibraryPanelService librarypanels.Service `inject:""` LibraryElementService libraryelements.Service `inject:""` SocialService social.Service `inject:""`