diff --git a/pkg/services/ngalert/remote/client/alertmanager.go b/pkg/services/ngalert/remote/client/alertmanager.go index 911fc628d17..2f93652bc3b 100644 --- a/pkg/services/ngalert/remote/client/alertmanager.go +++ b/pkg/services/ngalert/remote/client/alertmanager.go @@ -107,6 +107,10 @@ func (am *Alertmanager) IsReadyWithBackoff(ctx context.Context) (bool, error) { } if status != http.StatusOK { + if status/400 == 1 { + am.logger.Debug("Ready check failed with non-retriable status code", "attempt", attempts, "status", status) + return false, fmt.Errorf("ready check failed with non-retriable status code %d", status) + } am.logger.Debug("Ready check failed, status code is not 200", "attempt", attempts, "status", status, "err", err) continue }