mirror of https://github.com/prometheus/prometheus
Merge pull request #729 from prometheus/fix-double-slash
Fix double slash in GeneratorURL sent to alertmanager.pull/731/head
commit
97c0c01b40
|
@ -16,6 +16,7 @@ package rules
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -211,7 +212,7 @@ func (m *Manager) queueAlertNotifications(rule *AlertingRule, timestamp clientmo
|
||||||
Value: aa.Value,
|
Value: aa.Value,
|
||||||
ActiveSince: aa.ActiveSince.Time(),
|
ActiveSince: aa.ActiveSince.Time(),
|
||||||
RuleString: rule.String(),
|
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)
|
m.notificationHandler.SubmitReqs(notifications)
|
||||||
|
|
Loading…
Reference in New Issue