mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
vmalert: remove trailing slash for static notifier addresses
This would make addresses `http://localhost:9093` and `http://localhost:9093/` both to result into `http://localhost:9093/api/v2/alerts`. Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
5da71eb685
commit
f57982eddc
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ package notifier
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil"
|
||||
|
@ -93,6 +94,7 @@ func notifiersFromFlags(gen AlertURLGenerator) ([]Notifier, error) {
|
|||
Password: promauth.NewSecret(basicAuthPassword.GetOptionalArg(i)),
|
||||
},
|
||||
}
|
||||
addr = strings.TrimSuffix(addr, "/")
|
||||
am, err := NewAlertManager(addr+alertManagerPath, gen, authCfg, time.Minute)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue