From d0f91e7705fe0aa56ec50d50bac3e97dd1636e4f Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 5 Mar 2020 08:58:37 +0100 Subject: [PATCH] Fix overlapping rules --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 66a4e4d..c9b814e 100644 --- a/main.go +++ b/main.go @@ -70,8 +70,8 @@ func (alertFile AlertFile) Override(overrideRule Rule) { for i, group := range alertFile.Groups { for j, rule := range group.Rules { - // Skip if the rule is the same - if rule.AlertName == overrideRule.AlertName || rule.AlertName == "" { + // Skip if the rule is the same and override rules itself + if rule.AlertName == overrideRule.AlertName || rule.AlertName == "" || len(rule.OverrideRules) > 0 { continue }