Skip to content

Commit

Permalink
Merge pull request #612 from prometheus/strip-am-url-slash
Browse files Browse the repository at this point in the history
Strip trailing slash in alertmanager URL.
  • Loading branch information
juliusv committed Mar 30, 2015
2 parents 52d89b2 + 5aae273 commit b456240
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notification/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"io"
"io/ioutil"
"net/http"
"strings"
"time"

"github.com/golang/glog"
Expand Down Expand Up @@ -95,7 +96,7 @@ type NotificationHandler struct {
// NewNotificationHandler constructs a new NotificationHandler.
func NewNotificationHandler(alertmanagerURL string, notificationQueueCapacity int) *NotificationHandler {
return &NotificationHandler{
alertmanagerURL: alertmanagerURL,
alertmanagerURL: strings.TrimRight(alertmanagerURL, "/"),
pendingNotifications: make(chan NotificationReqs, notificationQueueCapacity),

httpClient: utility.NewDeadlineClient(*deadline),
Expand Down

0 comments on commit b456240

Please sign in to comment.