mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Moved to ip + port as a primary node identifier.
This commit is contained in:
parent
112315271d
commit
384322abdb
2 changed files with 5 additions and 2 deletions
|
@ -25,6 +25,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Map;
|
||||
|
||||
public class Utils {
|
||||
|
@ -36,10 +37,12 @@ public class Utils {
|
|||
|
||||
if (node.address().uniqueAddressTypeId() == 1) { // InetSocket
|
||||
InetSocketTransportAddress address = (InetSocketTransportAddress) node.address();
|
||||
InetAddress inetAddress = address.address().getAddress();
|
||||
InetSocketAddress inetSocketAddress = address.address();
|
||||
InetAddress inetAddress = inetSocketAddress.getAddress();
|
||||
if (inetAddress != null) {
|
||||
builder.field("ip", inetAddress.getHostAddress());
|
||||
builder.field("hostname", inetAddress.getHostName());
|
||||
builder.field("ip_port", inetAddress.getHostAddress() + ":" + inetSocketAddress.getPort());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ define([
|
|||
nodes: {
|
||||
defaults: {
|
||||
display_field: "node.name",
|
||||
persistent_field: "node.transport_address",
|
||||
persistent_field: "node.ip_port",
|
||||
metrics: [ 'process.cpu.percent', 'os.load_average.1m', 'os.mem.used_percent', 'fs.data.available_in_bytes' ],
|
||||
show_hidden: true
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue