Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* [BUGFIX] Fixed ingesters with less tokens stuck in LEAVING. #5061
* [BUGFIX] Tracing: Fix missing object storage span instrumentation. #5074
* [BUGFIX] Ingester: Ingesters returning empty response for metadata APIs. #5081
* [FEATURE] Alertmanager: Add support for time_intervals. #5102

## 1.14.0 2022-12-02

Expand Down
10 changes: 7 additions & 3 deletions pkg/alertmanager/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,17 +368,21 @@ func (am *Alertmanager) ApplyConfig(userID string, conf *config.Config, rawCfg s
return nil
}

muteTimes := make(map[string][]timeinterval.TimeInterval, len(conf.MuteTimeIntervals))
timeIntervals := make(map[string][]timeinterval.TimeInterval, len(conf.MuteTimeIntervals)+len(conf.TimeIntervals))
for _, ti := range conf.MuteTimeIntervals {
muteTimes[ti.Name] = ti.TimeIntervals
timeIntervals[ti.Name] = ti.TimeIntervals
}

for _, ti := range conf.TimeIntervals {
timeIntervals[ti.Name] = ti.TimeIntervals
}

pipeline := am.pipelineBuilder.New(
integrationsMap,
waitFunc,
am.inhibitor,
silence.NewSilencer(am.silences, am.marker, am.logger),
muteTimes,
timeIntervals,
am.nflog,
am.state,
)
Expand Down