From ff53d10849165f5ec1de673bf4446bd663ac276b Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Sat, 23 May 2015 19:16:35 +0200 Subject: [PATCH] Fix double slash in GeneratorURL sent to alertmanager. Fixes https://github.com/prometheus/prometheus/issues/722 --- rules/manager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/manager.go b/rules/manager.go index ed2735803..bb7ba7aed 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -16,6 +16,7 @@ package rules import ( "fmt" "io/ioutil" + "strings" "sync" "time" @@ -211,7 +212,7 @@ func (m *Manager) queueAlertNotifications(rule *AlertingRule, timestamp clientmo Value: aa.Value, ActiveSince: aa.ActiveSince.Time(), RuleString: rule.String(), - GeneratorURL: m.prometheusURL + utility.GraphLinkForExpression(rule.Vector.String()), + GeneratorURL: m.prometheusURL + strings.TrimLeft(utility.GraphLinkForExpression(rule.Vector.String()), "/"), }) } m.notificationHandler.SubmitReqs(notifications)