mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-24 10:56:53 +00:00
feat(cumulative): added cumulative window
This commit is contained in:
parent
735f9e8105
commit
473488a91a
@ -144,7 +144,7 @@ func ParseIntoRule(initRule PostableRule, content []byte, kind RuleDataKind) (*P
|
||||
|
||||
//added alerts v2 fields
|
||||
rule.RuleCondition.Thresholds = append(rule.RuleCondition.Thresholds,
|
||||
NewBasicRuleThreshold(rule.AlertName, rule.RuleCondition.Target, 0, rule.RuleCondition.MatchType, rule.RuleCondition.CompareOp, rule.RuleCondition.SelectedQuery, rule.RuleCondition.TargetUnit, rule.RuleCondition.CompositeQuery.Unit))
|
||||
NewBasicRuleThreshold(rule.AlertName, rule.RuleCondition.Target, nil, rule.RuleCondition.MatchType, rule.RuleCondition.CompareOp, rule.RuleCondition.SelectedQuery, rule.RuleCondition.TargetUnit, rule.RuleCondition.CompositeQuery.Unit))
|
||||
rule.Evaluation = NewEvaluation("rolling", RollingWindow{EvalWindow: rule.EvalWindow, Frequency: rule.Frequency, RequiredNumPoints: rule.RuleCondition.RequiredNumPoints, RequireMinPoints: rule.RuleCondition.RequireMinPoints})
|
||||
return rule, nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user