mirror of
https://github.com/prymitive/karma
synced 2026-05-17 04:16:42 +00:00
fix(backend): ensure that we always use default timeout for am requests
Timeout attribute for each alertmanager upstream should default to the value of alertmanager.timeout flag. Without that it will default to 0s which will cause it to timeout instantly
This commit is contained in:
@@ -172,6 +172,11 @@ func (config *configSchema) Read() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for i, s := range config.Alertmanager.Servers {
|
||||
if s.Timeout.Seconds() == 0 {
|
||||
config.Alertmanager.Servers[i].Timeout = v.GetDuration("alertmanager.timeout")
|
||||
}
|
||||
}
|
||||
|
||||
err = v.UnmarshalKey("jira", &config.JIRA)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user