mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
Alerting: Stop retries on 4xx status code responses (remote Alertmanager readiness check) (#80350)
This commit is contained in:
parent
8dba53b541
commit
6c87d9a1e7
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user