mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-01 11:11:44 +00:00
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 <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com> Co-authored-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
parent
d10f21f38c
commit
229ecb7e9a
@ -515,6 +515,19 @@ func run() int {
|
||||
r.Key(),
|
||||
)
|
||||
}
|
||||
|
||||
if r.RouteOpts.RepeatInterval < r.RouteOpts.GroupInterval {
|
||||
level.Warn(configLogger).Log(
|
||||
"msg",
|
||||
"repeat_interval is less than group_interval. Notifications will not repeat until the next group_interval.",
|
||||
"repeat_interval",
|
||||
r.RouteOpts.RepeatInterval,
|
||||
"group_interval",
|
||||
r.RouteOpts.GroupInterval,
|
||||
"route",
|
||||
r.Key(),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
go disp.Run()
|
||||
|
@ -197,7 +197,7 @@ matchers:
|
||||
# Note that this parameter is implicitly bound by Alertmanager's
|
||||
# `--data.retention` configuration flag. Notifications will be resent after either
|
||||
# repeat_interval or the data retention period have passed, whichever
|
||||
# occurs first.
|
||||
# occurs first. `repeat_interval` should not be less than `group_interval`.
|
||||
[ repeat_interval: <duration> | default = 4h ]
|
||||
|
||||
# Times when the route should be muted. These must match the name of a
|
||||
|
Loading…
Reference in New Issue
Block a user