Remote Alertmanager: Wire up remoteSecondaryAlertmanagerWithRemoteState and fix path (#109253)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user