Skip to content

Commit

Permalink
[elasticsearch] Always report transport address in node_stats (#36582)
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonhultgren authored Sep 20, 2023
1 parent 622de0c commit 24c3388
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metricbeat/module/elasticsearch/node_stats/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 24c3388

Please sign in to comment.