Merge pull request #154 from octo/master

manager: Guard agg.Rule against dereferencing when nil.
This commit is contained in:
Brian Brazil 2015-11-20 09:07:05 +00:00
commit ec60790042

View File

@ -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)