Remote Alertmanager: Wire up remoteSecondaryAlertmanagerWithRemoteState and fix path (#109253)

This commit is contained in:
Santiago
2025-08-06 17:33:31 +02:00
committed by GitHub
parent c634fa5fdf
commit 1914fb95ee
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -274,10 +274,11 @@ func (ng *AlertNG) init() error {
// Use both Alertmanager implementations in the forked Alertmanager.
rsCfg := remote.RemoteSecondaryConfig{
Logger: log.New("ngalert.forked-alertmanager.remote-secondary"),
OrgID: orgID,
Store: ng.store,
SyncInterval: ng.Cfg.UnifiedAlerting.RemoteAlertmanager.SyncInterval,
Logger: log.New("ngalert.forked-alertmanager.remote-secondary"),
OrgID: orgID,
Store: ng.store,
SyncInterval: ng.Cfg.UnifiedAlerting.RemoteAlertmanager.SyncInterval,
WithRemoteState: remoteSecondaryWithRemoteState,
}
return remote.NewRemoteSecondaryForkedAlertmanager(rsCfg, internalAM, remoteAM)
}
@@ -33,7 +33,7 @@ func (mc *Mimir) getState(ctx context.Context, path string) (*UserState, error)
}
// nolint:bodyclose
// closed within `do`
_, err := mc.do(ctx, grafanaAlertmanagerStatePath, http.MethodGet, nil, &response)
_, err := mc.do(ctx, path, http.MethodGet, nil, &response)
if err != nil {
return nil, err
}