Skip to content

Commit

Permalink
cmd/amtool: use base path from the configured URL (prometheus#1940)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier authored Jun 25, 2019
1 parent 5ff6cff commit add7700
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cli
import (
"net/url"
"os"
"path"
"time"

"github.com/go-openapi/strfmt"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit add7700

Please sign in to comment.