Skip to content

Commit

Permalink
modify customize alert rule (erda-project#2860) (erda-project#2870)
Browse files Browse the repository at this point in the history
Co-authored-by: panjiayao <44628544+Counterflowwind@users.noreply.github.com>
  • Loading branch information
erda-bot and Counterflowwind authored Nov 4, 2021
1 parent 72e66b3 commit 207151a
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 @@ -495,11 +495,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 @@ -516,11 +516,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 207151a

Please sign in to comment.