mirror of
https://github.com/prometheus/alertmanager
synced 2025-03-11 06:07:46 +00:00
Merge pull request #154 from octo/master
manager: Guard agg.Rule against dereferencing when nil.
This commit is contained in:
commit
ec60790042
@ -279,7 +279,9 @@ func (s *memoryAlertManager) removeExpiredAggregates() {
|
||||
|
||||
if time.Since(agg.LastRefreshed) > s.minRefreshInterval {
|
||||
delete(s.aggregates, agg.Alert.Fingerprint())
|
||||
s.notifier.QueueNotification(agg.Alert, notificationOpResolve, agg.Rule.NotificationConfigName)
|
||||
if agg.Rule != nil {
|
||||
s.notifier.QueueNotification(agg.Alert, notificationOpResolve, agg.Rule.NotificationConfigName)
|
||||
}
|
||||
s.needsNotificationRefresh = true
|
||||
} else {
|
||||
heap.Push(&s.aggregatesByLastRefreshed, agg)
|
||||
|
Loading…
Reference in New Issue
Block a user