diff --git a/api/api.go b/api/api.go index 1ada2d42..edcb15f5 100644 --- a/api/api.go +++ b/api/api.go @@ -300,6 +300,11 @@ func (api *API) listAlerts(w http.ResponseWriter, r *http.Request) { continue } + // Continue if alert is resolved + if !a.Alert.EndsAt.IsZero() && a.Alert.EndsAt.Before(time.Now()) { + continue + } + status := api.getAlertStatus(a.Fingerprint()) if !showSilenced && len(status.SilencedBy) != 0 { diff --git a/notify/notify.go b/notify/notify.go index bd9c3b07..f848a0b5 100644 --- a/notify/notify.go +++ b/notify/notify.go @@ -474,7 +474,7 @@ func (n *DedupStage) needsUpdate(entry *nflogpb.Entry, firing, resolved map[uint // If we haven't notified about the alert group before, notify right away // unless we only have resolved alerts. if entry == nil { - return ((len(firing) > 0) || (n.sendResolved && len(resolved) > 0)), nil + return len(firing) > 0, nil } if !entry.IsFiringSubset(firing) {