Skip to content

Commit

Permalink
Fix overlapping rules
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhaus committed Mar 5, 2020
1 parent fcdfc6e commit d0f91e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit d0f91e7

Please sign in to comment.