mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(monitor): add reducer of AlertRecordRule (#20582)
This commit is contained in:
@@ -96,4 +96,5 @@ type AlertRecordRule struct {
|
||||
ConditionType string `json:"condition_type"`
|
||||
// 静默期
|
||||
SilentPeriod string `json:"silent_period"`
|
||||
Reducer string `json:"reducer"`
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user