feat(monitor): add reducer of AlertRecordRule (#20582)

This commit is contained in:
Zexi Li
2024-06-19 19:20:11 +08:00
committed by GitHub
parent 50db770fd1
commit e9d997d4c9
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -96,4 +96,5 @@ type AlertRecordRule struct {
ConditionType string `json:"condition_type"`
// 静默期
SilentPeriod string `json:"silent_period"`
Reducer string `json:"reducer"`
}
+1
View File
@@ -191,6 +191,7 @@ func newRuleDescription(rule *Rule, alertDetails *monitor.CommonAlertMetricDetai
Comparator: alertDetails.Comparator,
Threshold: RationalizeValueFromUnit(alertDetails.Threshold, alertDetails.FieldDescription.Unit, ""),
ConditionType: alertDetails.ConditionType,
Reducer: alertDetails.Reduce,
},
}
if len(ruleDes.ResType) == 0 {