mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #612 from prometheus/strip-am-url-slash
Strip trailing slash in alertmanager URL.
This commit is contained in:
commit
b456240c46
|
@ -20,6 +20,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
|
@ -95,7 +96,7 @@ type NotificationHandler struct {
|
||||||
// NewNotificationHandler constructs a new NotificationHandler.
|
// NewNotificationHandler constructs a new NotificationHandler.
|
||||||
func NewNotificationHandler(alertmanagerURL string, notificationQueueCapacity int) *NotificationHandler {
|
func NewNotificationHandler(alertmanagerURL string, notificationQueueCapacity int) *NotificationHandler {
|
||||||
return &NotificationHandler{
|
return &NotificationHandler{
|
||||||
alertmanagerURL: alertmanagerURL,
|
alertmanagerURL: strings.TrimRight(alertmanagerURL, "/"),
|
||||||
pendingNotifications: make(chan NotificationReqs, notificationQueueCapacity),
|
pendingNotifications: make(chan NotificationReqs, notificationQueueCapacity),
|
||||||
|
|
||||||
httpClient: utility.NewDeadlineClient(*deadline),
|
httpClient: utility.NewDeadlineClient(*deadline),
|
||||||
|
|
Loading…
Reference in a new issue