-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Implement remote cluster CCS telemetry #112478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
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 c6e7c04
Implement remote cluster stats polling
smalyshev fc0b06a
Improve failure handling
smalyshev 16d0526
Parallelize remotes fetching
smalyshev 172c473
Add new action to non-operator list
smalyshev fb03fea
Add docs for the include_remotes part
smalyshev 3aa0bbd
Add tests
smalyshev 8b86ac4
re-fix the name
smalyshev 1990c25
ws
smalyshev 8ad91b2
Create separate class for remote request - seems cleaner this way
smalyshev e77eafc
Add capabilities for stats depending on the flag for now
smalyshev b883a0b
Split remote handler into two - HandledAction and TransportNodesAction
smalyshev 47a7c4c
Refactoring - eliminate class split and make TransportClusterStatsAct…
smalyshev b83818d
Refactor TransportClusterStatsAction - should not use field for the f…
smalyshev 75854ba
Refactor the code to eliminate blocking wait
smalyshev 29eecfa
Refactor remote stats with using CancellableFanout
smalyshev cf5e2ec
Add parent task it to requests
smalyshev 630637e
Refactor listener to simplify
smalyshev 76866cf
Pull feedback
smalyshev 4a5fb64
Rm it from constants
smalyshev 24708cc
Merge branch 'main' into ccs-telemetry-remotes
elasticmachine 83f6bb1
Update the licenses
smalyshev bfc7cca
Add roundtrip REST YAML test
smalyshev 5bc72fd
Add check for remote transport
smalyshev ce1cf6c
Implement human option in bytes and drop nodes on remote request
smalyshev 0b1d20f
Give it a little longer to boot up
smalyshev 17b144f
Merge branch 'main' into ccs-telemetry-remotes
smalyshev a07206e
Update TransportClusterStatsAction code with new action context code
smalyshev 98b8541
Merge branch 'main' into ccs-telemetry-remotes
elasticmachine fbf1ca1
Pull feedback & refactoring
smalyshev 40090bc
Add handling of possible exception
smalyshev 4daaaea
Revert "Add handling of possible exception"
smalyshev 0f6c212
Add new version for RemoteClusterStatsRequest
smalyshev 561d82e
Merge branch 'main' into ccs-telemetry-remotes
smalyshev 470c86c
Update for docs feedback
smalyshev 5ba37ca
Merge branch 'main' into ccs-telemetry-remotes
smalyshev 2105c87
Do not sent RemoteClusterStatsRequest to old clusters
smalyshev 95f9a78
Merge branch 'main' into ccs-telemetry-remotes
smalyshev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151 changes: 151 additions & 0 deletions
151
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.stats/30_ccs_stats.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
--- | ||
"cross-cluster search stats basic": | ||
- requires: | ||
test_runner_features: [ capabilities ] | ||
capabilities: | ||
- method: GET | ||
path: /_cluster/stats | ||
capabilities: | ||
- "ccs-stats" | ||
reason: "Capability required to run test" | ||
|
||
- do: | ||
cluster.stats: { } | ||
|
||
- is_true: ccs | ||
- is_true: ccs._search | ||
- is_false: ccs.clusters # no ccs clusters configured | ||
- exists: ccs._search.total | ||
- exists: ccs._search.success | ||
- exists: ccs._search.skipped | ||
- is_true: ccs._search.took | ||
- is_true: ccs._search.took_mrt_true | ||
- is_true: ccs._search.took_mrt_false | ||
- exists: ccs._search.remotes_per_search_max | ||
- exists: ccs._search.remotes_per_search_avg | ||
- exists: ccs._search.failure_reasons | ||
- exists: ccs._search.features | ||
- exists: ccs._search.clients | ||
- exists: ccs._search.clusters | ||
|
||
--- | ||
"cross-cluster search stats search": | ||
- requires: | ||
test_runner_features: [ capabilities ] | ||
capabilities: | ||
- method: GET | ||
path: /_cluster/stats | ||
capabilities: | ||
- "ccs-stats" | ||
reason: "Capability required to run test" | ||
|
||
- do: | ||
cluster.state: {} | ||
- set: { master_node: master } | ||
- do: | ||
nodes.info: | ||
metric: [ http, transport ] | ||
- set: {nodes.$master.http.publish_address: host} | ||
- set: {nodes.$master.transport.publish_address: transport_host} | ||
|
||
- do: | ||
cluster.put_settings: | ||
body: | ||
persistent: | ||
cluster: | ||
remote: | ||
cluster_one: | ||
seeds: | ||
- "${transport_host}" | ||
skip_unavailable: true | ||
cluster_two: | ||
seeds: | ||
- "${transport_host}" | ||
skip_unavailable: false | ||
- is_true: persistent.cluster.remote.cluster_one | ||
|
||
- do: | ||
indices.create: | ||
index: test | ||
body: | ||
settings: | ||
number_of_replicas: 0 | ||
|
||
- do: | ||
index: | ||
index: test | ||
id: "1" | ||
refresh: true | ||
body: | ||
foo: bar | ||
|
||
- do: | ||
cluster.health: | ||
wait_for_status: green | ||
|
||
- do: | ||
search: | ||
index: "*,*:*" | ||
body: | ||
query: | ||
match: | ||
foo: bar | ||
|
||
- do: | ||
cluster.stats: {} | ||
- is_true: ccs | ||
- is_true: ccs._search | ||
- is_false: ccs.clusters # Still no remotes since include_remotes is not set | ||
|
||
- do: | ||
cluster.stats: | ||
include_remotes: true | ||
- is_true: ccs | ||
- is_true: ccs._search | ||
- is_true: ccs.clusters # Now we have remotes | ||
- is_true: ccs.clusters.cluster_one | ||
- is_true: ccs.clusters.cluster_two | ||
- is_true: ccs.clusters.cluster_one.cluster_uuid | ||
- match: { ccs.clusters.cluster_one.mode: sniff } | ||
- match: { ccs.clusters.cluster_one.skip_unavailable: true } | ||
- match: { ccs.clusters.cluster_two.skip_unavailable: false } | ||
- is_true: ccs.clusters.cluster_one.version | ||
- match: { ccs.clusters.cluster_one.status: green } | ||
- match: { ccs.clusters.cluster_two.status: green } | ||
- is_true: ccs.clusters.cluster_one.nodes_count | ||
- is_true: ccs.clusters.cluster_one.shards_count | ||
- is_true: ccs.clusters.cluster_one.indices_count | ||
- is_true: ccs.clusters.cluster_one.indices_total_size_in_bytes | ||
- is_true: ccs.clusters.cluster_one.max_heap_in_bytes | ||
- is_true: ccs.clusters.cluster_one.mem_total_in_bytes | ||
- is_true: ccs._search.total | ||
- is_true: ccs._search.success | ||
- exists: ccs._search.skipped | ||
- is_true: ccs._search.took | ||
- is_true: ccs._search.took.max | ||
- is_true: ccs._search.took.avg | ||
- is_true: ccs._search.took.p90 | ||
- is_true: ccs._search.took_mrt_true | ||
- exists: ccs._search.took_mrt_true.max | ||
- exists: ccs._search.took_mrt_true.avg | ||
- exists: ccs._search.took_mrt_true.p90 | ||
- is_true: ccs._search.took_mrt_false | ||
- exists: ccs._search.took_mrt_false.max | ||
- exists: ccs._search.took_mrt_false.avg | ||
- exists: ccs._search.took_mrt_false.p90 | ||
- match: { ccs._search.remotes_per_search_max: 2 } | ||
- match: { ccs._search.remotes_per_search_avg: 2.0 } | ||
- exists: ccs._search.failure_reasons | ||
- exists: ccs._search.features | ||
- exists: ccs._search.clients | ||
- is_true: ccs._search.clusters | ||
- is_true: ccs._search.clusters.cluster_one | ||
- is_true: ccs._search.clusters.cluster_two | ||
- gte: {ccs._search.clusters.cluster_one.total: 1} | ||
- gte: {ccs._search.clusters.cluster_two.total: 1} | ||
- exists: ccs._search.clusters.cluster_one.skipped | ||
- exists: ccs._search.clusters.cluster_two.skipped | ||
- is_true: ccs._search.clusters.cluster_one.took | ||
- is_true: ccs._search.clusters.cluster_one.took.max | ||
- is_true: ccs._search.clusters.cluster_one.took.avg | ||
- is_true: ccs._search.clusters.cluster_one.took.p90 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.