Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6092acf
Add remote cluster stats to _cluster/stats - phase 1
smalyshev Aug 29, 2024
c6e7c04
Implement remote cluster stats polling
smalyshev Sep 3, 2024
fc0b06a
Improve failure handling
smalyshev Sep 4, 2024
16d0526
Parallelize remotes fetching
smalyshev Sep 5, 2024
172c473
Add new action to non-operator list
smalyshev Sep 5, 2024
fb03fea
Add docs for the include_remotes part
smalyshev Sep 5, 2024
3aa0bbd
Add tests
smalyshev Sep 6, 2024
8b86ac4
re-fix the name
smalyshev Sep 10, 2024
1990c25
ws
smalyshev Sep 10, 2024
8ad91b2
Create separate class for remote request - seems cleaner this way
smalyshev Sep 11, 2024
e77eafc
Add capabilities for stats depending on the flag for now
smalyshev Sep 11, 2024
b883a0b
Split remote handler into two - HandledAction and TransportNodesAction
smalyshev Sep 11, 2024
47a7c4c
Refactoring - eliminate class split and make TransportClusterStatsAct…
smalyshev Sep 12, 2024
b83818d
Refactor TransportClusterStatsAction - should not use field for the f…
smalyshev Sep 12, 2024
75854ba
Refactor the code to eliminate blocking wait
smalyshev Sep 13, 2024
29eecfa
Refactor remote stats with using CancellableFanout
smalyshev Sep 13, 2024
cf5e2ec
Add parent task it to requests
smalyshev Sep 13, 2024
630637e
Refactor listener to simplify
smalyshev Sep 13, 2024
76866cf
Pull feedback
smalyshev Sep 16, 2024
4a5fb64
Rm it from constants
smalyshev Sep 16, 2024
24708cc
Merge branch 'main' into ccs-telemetry-remotes
elasticmachine Sep 16, 2024
83f6bb1
Update the licenses
smalyshev Sep 16, 2024
bfc7cca
Add roundtrip REST YAML test
smalyshev Sep 16, 2024
5bc72fd
Add check for remote transport
smalyshev Sep 16, 2024
ce1cf6c
Implement human option in bytes and drop nodes on remote request
smalyshev Sep 17, 2024
0b1d20f
Give it a little longer to boot up
smalyshev Sep 17, 2024
17b144f
Merge branch 'main' into ccs-telemetry-remotes
smalyshev Sep 19, 2024
a07206e
Update TransportClusterStatsAction code with new action context code
smalyshev Sep 19, 2024
98b8541
Merge branch 'main' into ccs-telemetry-remotes
elasticmachine Sep 19, 2024
fbf1ca1
Pull feedback & refactoring
smalyshev Sep 20, 2024
40090bc
Add handling of possible exception
smalyshev Sep 20, 2024
4daaaea
Revert "Add handling of possible exception"
smalyshev Sep 20, 2024
0f6c212
Add new version for RemoteClusterStatsRequest
smalyshev Sep 21, 2024
561d82e
Merge branch 'main' into ccs-telemetry-remotes
smalyshev Sep 21, 2024
470c86c
Update for docs feedback
smalyshev Sep 23, 2024
5ba37ca
Merge branch 'main' into ccs-telemetry-remotes
smalyshev Sep 26, 2024
2105c87
Do not sent RemoteClusterStatsRequest to old clusters
smalyshev Sep 26, 2024
95f9a78
Merge branch 'main' into ccs-telemetry-remotes
smalyshev Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions docs/reference/cluster/stats.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ If a node does not respond before its timeout expires, the response does not inc
However, timed out nodes are included in the response's `_nodes.failed` property.
Defaults to no timeout.

`include_remotes`::
(Optional, Boolean) If `true`, includes remote cluster information in the response.
Defaults to no remote cluster information.

[role="child_attributes"]
[[cluster-stats-api-response-body]]
==== {api-response-body-title}
Expand Down Expand Up @@ -1314,6 +1318,56 @@ Each repository type may also include other statistics about the repositories of
[%collapsible%open]
=====

`clusters`:::
(object) Contains remote cluster settings and metrics collected from them. Only present if `include_remotes` option is
set to `true` and there are any remote clusters configured. If the node filter is specified, it will be passed
to the remote clusters.
The keys are cluster names, and the values are per-cluster data.

+
.Properties of `clusters`
[%collapsible%open]
======
`cluster_uuid`:::
(string) The UUID of the remote cluster.

`mode`:::
(string) The <<sniff-proxy-modes, connection mode>> used to communicate with the remote cluster.

`skip_unavailable`:::
(Boolean) The `skip_unavailable` <<skip-unavailable-clusters, setting>> used for this remote cluster.

`transport.compress`:::
(string) Transport compression setting used for this remote cluster.

`version`:::
(array of strings) The list of {es} versions used by the nodes on the remote cluster.

`status`:::
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cluster-health-status]
+
See <<cluster-health>>.

`nodes_count`:::
(integer) The total count of nodes in the remote cluster.

`shards_count`:::
(integer) The total number of shards in the remote cluster.

`indices_count`:::
(integer) The total number of indices in the remote cluster.

`indices_total_size_bytes`:::
(integer) Total data set size, in bytes, of all shards assigned to selected nodes.

`max_heap_bytes`:::
(integer) Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster.

`mem_total_bytes`:::
(string) Total amount, in bytes, of physical memory across the nodes of the remote cluster.

======


`_search`:::
(object) Contains the telemetry information about the <<modules-cross-cluster-search, {ccs}>> usage in the cluster.
Expand Down Expand Up @@ -1812,3 +1866,36 @@ This API can be restricted to a subset of the nodes using <<cluster-nodes,node f
--------------------------------------------------
GET /_cluster/stats/nodes/node1,node*,master:false
--------------------------------------------------

This API call will return data about the remote clusters if any are configured:

[source,console]
--------------------------------------------------
GET /_cluster/stats?include_remotes=true
--------------------------------------------------
The resulting response will contain the `ccs` object with information about the remote clusters:

[source, js]
--------------------------------------------------
{
"ccs": {
"clusters": {
"remote_cluster": {
"cluster_uuid": "YjAvIhsCQ9CbjWZb2qJw3Q",
"mode": "sniff",
"skip_unavailable": false,
"transport.compress": "true",
"version": ["8.16.0"],
"status": "green",
"nodes_count": 10,
"shards_count": 420,
"indices_count": 10,
"indices_total_size_bytes": 6232658362,
"max_heap_bytes": 1037959168,
"mem_total_bytes": 137438953472
}
}
}
}
--------------------------------------------------
// TESTRESPONSE[skip:TODO]
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public String getName() {
@Override
public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {
ClusterStatsRequest clusterStatsRequest = new ClusterStatsRequest(
request.paramAsBoolean("remotes", false),
request.paramAsBoolean("include_remotes", false),
request.paramAsStringArray("nodeId", null)
);
clusterStatsRequest.timeout(getTimeout(request));
Expand Down