diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:15:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:15:20 +0000 |
commit | 87d772a7d708fec12f48cd8adc0dedff6e1025da (patch) | |
tree | 1fee344c64cc3f43074a01981e21126c8482a522 /src/go/collectors/go.d.plugin/modules/consul/collect.go | |
parent | Adding upstream version 1.46.3. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/go/plugin/go.d/modules/consul/collect.go (renamed from src/go/collectors/go.d.plugin/modules/consul/collect.go) | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/consul/collect.go b/src/go/plugin/go.d/modules/consul/collect.go index 3b5ebfd30..3033e046e 100644 --- a/src/go/collectors/go.d.plugin/modules/consul/collect.go +++ b/src/go/plugin/go.d/modules/consul/collect.go @@ -8,7 +8,7 @@ import ( "io" "net/http" - "github.com/netdata/netdata/go/go.d.plugin/pkg/web" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) const ( @@ -69,12 +69,11 @@ func (c *Consul) isServer() bool { } func (c *Consul) doOKDecode(urlPath string, in interface{}, statusCodes ...int) error { - req, err := web.NewHTTPRequest(c.Request.Copy()) + req, err := web.NewHTTPRequestWithPath(c.Request, urlPath) if err != nil { return fmt.Errorf("error on creating request: %v", err) } - req.URL.Path = urlPath if c.ACLToken != "" { req.Header.Set("X-Consul-Token", c.ACLToken) } |