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/dnsdist/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/dnsdist/collect.go (renamed from src/go/collectors/go.d.plugin/modules/dnsdist/collect.go) | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/dnsdist/collect.go b/src/go/plugin/go.d/modules/dnsdist/collect.go index 650757479..9b860abf4 100644 --- a/src/go/collectors/go.d.plugin/modules/dnsdist/collect.go +++ b/src/go/plugin/go.d/modules/dnsdist/collect.go @@ -9,8 +9,8 @@ import ( "net/http" "net/url" - "github.com/netdata/netdata/go/go.d.plugin/pkg/stm" - "github.com/netdata/netdata/go/go.d.plugin/pkg/web" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/stm" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) const ( @@ -36,8 +36,10 @@ func (d *DNSdist) collectStatistic(collected map[string]int64, statistics *stati } func (d *DNSdist) scrapeStatistics() (*statisticMetrics, error) { - req, _ := web.NewHTTPRequest(d.Request) - req.URL.Path = urlPathJSONStat + req, err := web.NewHTTPRequestWithPath(d.Request, urlPathJSONStat) + if err != nil { + return nil, err + } req.URL.RawQuery = url.Values{"command": []string{"stats"}}.Encode() var statistics statisticMetrics |