|
@@ -40,15 +40,18 @@ public class ClusterStatsResponse extends BaseNodesResponse<ClusterStatsNodeResp
|
|
|
ClusterStatsIndices indicesStats;
|
|
|
ClusterHealthStatus status;
|
|
|
long timestamp;
|
|
|
+ String clusterUUID;
|
|
|
|
|
|
ClusterStatsResponse() {
|
|
|
}
|
|
|
|
|
|
public ClusterStatsResponse(long timestamp,
|
|
|
+ String clusterUUID,
|
|
|
ClusterName clusterName,
|
|
|
List<ClusterStatsNodeResponse> nodes,
|
|
|
List<FailedNodeException> failures) {
|
|
|
super(clusterName, nodes, failures);
|
|
|
+ this.clusterUUID = clusterUUID;
|
|
|
this.timestamp = timestamp;
|
|
|
nodesStats = new ClusterStatsNodes(nodes);
|
|
|
indicesStats = new ClusterStatsIndices(nodes);
|
|
@@ -61,6 +64,10 @@ public class ClusterStatsResponse extends BaseNodesResponse<ClusterStatsNodeResp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public String getClusterUUID() {
|
|
|
+ return this.clusterUUID;
|
|
|
+ }
|
|
|
+
|
|
|
public long getTimestamp() {
|
|
|
return this.timestamp;
|
|
|
}
|
|
@@ -111,6 +118,7 @@ public class ClusterStatsResponse extends BaseNodesResponse<ClusterStatsNodeResp
|
|
|
|
|
|
@Override
|
|
|
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
|
|
+ builder.field("cluster_uuid", getClusterUUID());
|
|
|
builder.field("timestamp", getTimestamp());
|
|
|
if (status != null) {
|
|
|
builder.field("status", status.name().toLowerCase(Locale.ROOT));
|