Skip to content

Commit

Permalink
modify customize alert rule (#2860)
Browse files Browse the repository at this point in the history
  • Loading branch information
Counterflowwind authored Nov 4, 2021
1 parent 3cb4da2 commit acf3f15
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions modules/core/monitor/alert/alert-apis/alert.service.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,6 @@ func (m *alertService) addFilter(alertScope, scope, scopeId string, rule *pb.Cus
Value: structpb.NewStringValue(scopeId),
})
}
rule.Filters = append(rule.Filters, &pb.CustomizeAlertRuleFilter{
Tag: "cluster_name",
Operator: "in",
Value: structpb.NewStringValue("$" + "cluster_name"),
})
}
}

Expand Down
5 changes: 0 additions & 5 deletions modules/msp/apm/alert/alert.service.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,6 @@ func (a *alertService) CreateCustomizeAlert(ctx context.Context, request *alert.
if rule.Metric == StatusPage {
continue
}
scopeApplicationFilter := monitor.CustomizeAlertRuleFilter{}
scopeApplicationFilter.Tag = "application_id"
scopeApplicationFilter.Operator = OperateIn
scopeApplicationFilter.Value = structpb.NewStringValue("$" + "application_id")
rule.Filters = append(rule.Filters, &scopeApplicationFilter)
}
requestData, err := json.Marshal(alertDetail)
if err != nil {
Expand Down

0 comments on commit acf3f15

Please sign in to comment.