Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Added support for running on node with local=true
Browse files Browse the repository at this point in the history
 ip_port field is set to "_local[NODEID]".

 Closes #
  • Loading branch information
bleskes committed Jan 27, 2014
1 parent 6a4e0db commit d44e83f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/src/main/java/org/elasticsearch/marvel/agent/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public static XContentBuilder nodeToXContent(DiscoveryNode node, XContentBuilder
builder.field("host", inetAddress.getHostName());
builder.field("ip_port", inetAddress.getHostAddress() + ":" + inetSocketAddress.getPort());
}
} else if (node.address().uniqueAddressTypeId() == 2) { // local transport
builder.field("ip_port", "_" + node.address()); // will end up being "_local[ID]"
}

if (!node.attributes().isEmpty()) {
Expand Down

0 comments on commit d44e83f

Please sign in to comment.