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
#36631)

(cherry picked from commit 24c3388)

Co-authored-by: Milton Hultgren <[email protected]>
  • Loading branch information
mergify[bot] and miltonhultgren authored Sep 21, 2023
1 parent cd0cb83 commit a499522
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 a499522

Please sign in to comment.