Skip to content

Commit 229ecb7

Browse files
Log a warning when repeat_interval is less than group_interval (#3389)
* Log a warning when repeat_interval is less than group_interval This commit updates Alertmanager to log a warning when repeat_interval is less than group_interval for an individual route. When repeat_interval is less than group_interval, the earliest a notification can be sent again is the next time the aggregation group is flushed, and this happens at each group_interval. Signed-off-by: George Robinson <[email protected]> --------- Signed-off-by: George Robinson <[email protected]> Co-authored-by: gotjosh <[email protected]>
1 parent d10f21f commit 229ecb7

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

cmd/alertmanager/main.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,19 @@ func run() int {
515515
r.Key(),
516516
)
517517
}
518+
519+
if r.RouteOpts.RepeatInterval < r.RouteOpts.GroupInterval {
520+
level.Warn(configLogger).Log(
521+
"msg",
522+
"repeat_interval is less than group_interval. Notifications will not repeat until the next group_interval.",
523+
"repeat_interval",
524+
r.RouteOpts.RepeatInterval,
525+
"group_interval",
526+
r.RouteOpts.GroupInterval,
527+
"route",
528+
r.Key(),
529+
)
530+
}
518531
})
519532

520533
go disp.Run()

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ matchers:
197197
# Note that this parameter is implicitly bound by Alertmanager's
198198
# `--data.retention` configuration flag. Notifications will be resent after either
199199
# repeat_interval or the data retention period have passed, whichever
200-
# occurs first.
200+
# occurs first. `repeat_interval` should not be less than `group_interval`.
201201
[ repeat_interval: <duration> | default = 4h ]
202202

203203
# Times when the route should be muted. These must match the name of a

0 commit comments

Comments
 (0)