From 24c3388ed6d8ed38917b042f9944ffda68ddb69a Mon Sep 17 00:00:00 2001 From: Milton Hultgren Date: Wed, 20 Sep 2023 16:02:55 +0200 Subject: [PATCH] [elasticsearch] Always report transport address in node_stats (#36582) --- metricbeat/module/elasticsearch/node_stats/data.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/metricbeat/module/elasticsearch/node_stats/data.go b/metricbeat/module/elasticsearch/node_stats/data.go index 14b03d504e4..1c0e00f9991 100644 --- a/metricbeat/module/elasticsearch/node_stats/data.go +++ b/metricbeat/module/elasticsearch/node_stats/data.go @@ -368,6 +368,12 @@ func eventsMapping(r mb.ReporterV2, m elasticsearch.MetricSetAPI, info elasticse continue } + if transportAddress, hasTransportAddress := node["transport_address"]; hasTransportAddress { + if transportAddress, ok := transportAddress.(string); ok { + event.Host = transportAddress + } + } + roles := node["roles"] event.ModuleFields = mapstr.M{