1
0
mirror of https://github.com/prometheus/alertmanager.git synced 2026-02-05 15:45:34 +01:00

cmd/amtool: use base path from the configured URL (#1940)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier
2019-06-25 14:22:29 +02:00
committed by GitHub
parent 5ff6cffa08
commit add7700a8b

View File

@@ -16,6 +16,7 @@ package cli
import (
"net/url"
"os"
"path"
"time"
"github.com/go-openapi/strfmt"
@@ -75,7 +76,7 @@ func NewAlertmanagerClient(amURL *url.URL) *client.Alertmanager {
schemes = []string{amURL.Scheme}
}
cr := clientruntime.New(address, defaultAmApiv2path, schemes)
cr := clientruntime.New(address, path.Join(amURL.Path, defaultAmApiv2path), schemes)
if amURL.User != nil {
password, _ := amURL.User.Password()