Skip to content

Commit df94b9b

Browse files
author
Cairry
committed
🚀 Optimized webhook notify content and handle alarm logic
1 parent 69d9439 commit df94b9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

alert/process/handle.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func alarmAggregation(ctx *ctx.Context, processType string, faultCenter models.F
106106
switch faultCenter.GetAlarmAggregationType() {
107107
case "Rule":
108108
for severity, events := range alertGroups {
109-
newAlertGroups[severity] = withRuleGroupByAlerts(ctx, processType, curTime, events)
109+
newAlertGroups[severity] = withRuleGroupByAlerts(ctx, curTime, events)
110110
}
111111
default:
112112
return alertGroups
@@ -116,7 +116,7 @@ func alarmAggregation(ctx *ctx.Context, processType string, faultCenter models.F
116116
}
117117

118118
// withRuleGroupByAlerts 聚合告警
119-
func withRuleGroupByAlerts(ctx *ctx.Context, processType string, timeInt int64, alerts []*models.AlertCurEvent) []*models.AlertCurEvent {
119+
func withRuleGroupByAlerts(ctx *ctx.Context, timeInt int64, alerts []*models.AlertCurEvent) []*models.AlertCurEvent {
120120
if len(alerts) <= 1 {
121121
return alerts
122122
}

0 commit comments

Comments
 (0)