diff --git a/metricbeat/module/logstash/node/node.go b/metricbeat/module/logstash/node/node.go index 8088867bc6d..734fad4c23a 100644 --- a/metricbeat/module/logstash/node/node.go +++ b/metricbeat/module/logstash/node/node.go @@ -66,7 +66,7 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { } if ms.XPack { - logstashVersion, err := logstash.GetVersion(http, nodePath) + logstashVersion, err := logstash.GetVersion(http, ms.HostData().SanitizedURI+nodePath) if err != nil { return nil, err } diff --git a/metricbeat/module/logstash/node_stats/node_stats.go b/metricbeat/module/logstash/node_stats/node_stats.go index 319ecd50389..bdd8a80ec3e 100644 --- a/metricbeat/module/logstash/node_stats/node_stats.go +++ b/metricbeat/module/logstash/node_stats/node_stats.go @@ -68,7 +68,7 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { } if ms.XPack { - logstashVersion, err := logstash.GetVersion(http, nodeStatsPath) + logstashVersion, err := logstash.GetVersion(http, ms.HostData().SanitizedURI+nodeStatsPath) if err != nil { return nil, err }