Alerting: Enable HA clustering in remote primary mode (#108930)
This commit is contained in:
@@ -225,7 +225,6 @@ func (ng *AlertNG) init() error {
|
||||
if remotePrimary {
|
||||
ng.Log.Debug("Starting Grafana with remote primary mode enabled")
|
||||
m.Info.WithLabelValues(metrics.ModeRemotePrimary).Set(1)
|
||||
ng.Cfg.UnifiedAlerting.SkipClustering = true
|
||||
// This function will be used by the MOA to create new Alertmanagers.
|
||||
override = notifier.WithAlertmanagerOverride(func(factoryFn notifier.OrgAlertmanagerFactory) notifier.OrgAlertmanagerFactory {
|
||||
return func(ctx context.Context, orgID int64) (notifier.Alertmanager, error) {
|
||||
|
||||
@@ -161,12 +161,8 @@ func NewMultiOrgAlertmanager(
|
||||
peer: &NilPeer{},
|
||||
}
|
||||
|
||||
if cfg.UnifiedAlerting.SkipClustering {
|
||||
l.Info("Skipping setting up clustering for MOA")
|
||||
} else {
|
||||
if err := moa.setupClustering(cfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := moa.setupClustering(cfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Set up the default per tenant Alertmanager factory.
|
||||
|
||||
@@ -121,7 +121,6 @@ type UnifiedAlertingSettings struct {
|
||||
DefaultRuleEvaluationInterval time.Duration
|
||||
Screenshots UnifiedAlertingScreenshotSettings
|
||||
ReservedLabels UnifiedAlertingReservedLabelSettings
|
||||
SkipClustering bool
|
||||
StateHistory UnifiedAlertingStateHistorySettings
|
||||
NotificationHistory UnifiedAlertingNotificationHistorySettings
|
||||
RemoteAlertmanager RemoteAlertmanagerSettings
|
||||
|
||||
Reference in New Issue
Block a user