mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-29 09:32:16 +00:00
Do not include resolved alerts in API response
This commit is contained in:
parent
91db91ef4a
commit
5fb30e1a0e
@ -98,8 +98,14 @@ func (d *Dispatcher) Groups() []*UIGroups {
|
||||
groups = append(groups, uig)
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
var uiAlerts []*UIAlert
|
||||
for _, a := range types.Alerts(alerts...) {
|
||||
if a.EndsAt.Before(now) {
|
||||
continue
|
||||
}
|
||||
|
||||
sid, _ := d.marker.Silenced(a.Fingerprint())
|
||||
|
||||
uiAlerts = append(uiAlerts, &UIAlert{
|
||||
|
Loading…
Reference in New Issue
Block a user