mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
Correctly update alerts
This commit is contained in:
5
timer.go
5
timer.go
@@ -91,11 +91,12 @@ func PullFromAlertmanager() {
|
||||
metricAlerts.With(prometheus.Labels{"state": alert.State}).Inc()
|
||||
}
|
||||
|
||||
for _, hint := range transform.BuildAutocomplete(ag.Alerts) {
|
||||
for _, hint := range transform.BuildAutocomplete(alerts) {
|
||||
acMap[hint.Value] = hint
|
||||
}
|
||||
|
||||
sort.Sort(&ag.Alerts)
|
||||
sort.Sort(&alerts)
|
||||
ag.Alerts = alerts
|
||||
|
||||
// ID is unique to each group
|
||||
ag.ID = fmt.Sprintf("%x", structhash.Sha1(ag.Labels, 1))
|
||||
|
||||
Reference in New Issue
Block a user