Skip to content

Commit 5c8733e

Browse files
author
Cairry
committed
✨ Add RuleGroupId field to alert history event
1 parent af785cf commit 5c8733e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

alert/process/process.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ func GetDutyUsers(ctx *ctx.Context, noticeData models.AlertNotice, noticeType st
140140
func RecordAlertHisEvent(ctx *ctx.Context, alert models.AlertCurEvent) error {
141141
hisData := models.AlertHisEvent{
142142
TenantId: alert.TenantId,
143+
RuleGroupId: alert.RuleGroupId,
143144
EventId: alert.EventId,
144145
DatasourceType: alert.DatasourceType,
145146
DatasourceId: alert.DatasourceId,

internal/models/alert_history_event.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type AlertHisEvent struct {
66
DatasourceId string `json:"datasource_id" gorm:"datasource_id"`
77
DatasourceType string `json:"datasource_type"`
88
Fingerprint string `json:"fingerprint"`
9+
RuleGroupId string `json:"rule_group_id"`
910
RuleId string `json:"rule_id"`
1011
RuleName string `json:"rule_name"`
1112
Severity string `json:"severity"`

0 commit comments

Comments
 (0)