Alerting: Fetch receivers from remote Alertmanager (#76841)

* Alerting: fetch receivers from remote Alertmanager

* make linter happy

* change require.Eventually() timeout and tick
This commit is contained in:
Santiago
2023-10-20 11:34:17 +02:00
committed by GitHub
parent fdb3ec5e98
commit a60ec150f9
5 changed files with 99 additions and 7 deletions
+4 -1
View File
@@ -298,7 +298,10 @@ func (srv AlertmanagerSrv) RouteGetReceivers(c *contextmodel.ReqContext) respons
return errResp
}
rcvs := am.GetReceivers(c.Req.Context())
rcvs, err := am.GetReceivers(c.Req.Context())
if err != nil {
return ErrResp(http.StatusInternalServerError, err, "failed to retrieve receivers")
}
return response.JSON(http.StatusOK, rcvs)
}