File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
testdata/fixtures/detector Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ package detector
2
+
3
+ // ReminderNotification struct for ReminderNotification
4
+ type ReminderNotification struct {
5
+ // The interval at which you want to receive the notifications, in milliseconds.
6
+ IntervalMs int64 `json:"interval"`
7
+ // The duration during which repeat notifications are sent, in milliseconds.
8
+ TimeoutMs int64 `json:"timeout,omitempty"`
9
+ // Type of reminder notification. Currently, the only supported value is TIMEOUT.
10
+ Type string `json:"type"`
11
+ }
Original file line number Diff line number Diff line change @@ -31,4 +31,6 @@ type Rule struct {
31
31
RunbookUrl string `json:"runbookUrl,omitempty"`
32
32
Severity Severity `json:"severity,omitempty"`
33
33
Tip string `json:"tip,omitempty"`
34
+ // Reminder notification in a detector rule lets you send multiple notifications for active alerts over a defined period of time.
35
+ ReminderNotification * ReminderNotification `json:"reminderNotification,omitempty"`
34
36
}
Original file line number Diff line number Diff line change @@ -254,6 +254,11 @@ func TestValidateDetector(t *testing.T) {
254
254
Description : "Maximum > 10 for 2m" ,
255
255
DetectLabel : "Test detector validation" ,
256
256
Severity : detector .INFO ,
257
+ ReminderNotification : & detector.ReminderNotification {
258
+ IntervalMs : 100 ,
259
+ TimeoutMs : 10000 ,
260
+ Type : "TIMEOUT" ,
261
+ },
257
262
},
258
263
},
259
264
})
Original file line number Diff line number Diff line change 38
38
"parameterizedBody" : " string" ,
39
39
"parameterizedSubject" : " string" ,
40
40
"runbookUrl" : " string" ,
41
+ "reminderNotification" : {
42
+ "interval" : 300000 ,
43
+ "timeout" : 3600000 ,
44
+ "type" : " TIMEOUT"
45
+ },
41
46
"severity" : " Critical"
42
47
}
43
48
],
You can’t perform that action at this time.
0 commit comments