Alerting: Enable HA clustering in remote primary mode (#108930)

This commit is contained in:
Alexander Akhmetov
2025-07-31 09:55:08 +02:00
committed by GitHub
parent 91e5e8019d
commit 6db07b901c
3 changed files with 2 additions and 8 deletions
-1
View File
@@ -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.
-1
View File
@@ -121,7 +121,6 @@ type UnifiedAlertingSettings struct {
DefaultRuleEvaluationInterval time.Duration
Screenshots UnifiedAlertingScreenshotSettings
ReservedLabels UnifiedAlertingReservedLabelSettings
SkipClustering bool
StateHistory UnifiedAlertingStateHistorySettings
NotificationHistory UnifiedAlertingNotificationHistorySettings
RemoteAlertmanager RemoteAlertmanagerSettings