Alerting: Use AlertRuleKey for comparison before rule evaluation (#98808)
(WIP) Alerting: Use AlertRuleKey for comparison before rule evaluation
This commit is contained in:
@@ -194,7 +194,7 @@ func (a *alertRule) Status() ngmodels.RuleStatus {
|
||||
//
|
||||
// the second element contains a dropped message that was sent by a concurrent sender.
|
||||
func (a *alertRule) Eval(eval *Evaluation) (bool, *Evaluation) {
|
||||
if a.key != eval.rule.GetKeyWithGroup() {
|
||||
if a.key.AlertRuleKey != eval.rule.GetKey() {
|
||||
// Make sure that rule has the same key. This should not happen
|
||||
a.logger.Error("Invalid rule sent for evaluating. Skipping", "ruleKeyToEvaluate", eval.rule.GetKey().String())
|
||||
return false, eval
|
||||
|
||||
Reference in New Issue
Block a user