-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit does two things: (1) It allows drilling down into the _internal/_health API. So in addition to GET _internal/_health, you can also drill down into a component, like GET _internal/_health/data for the data component. And you can drill down into an individual indicator, like GET _internal/_health/data/ilm for the ilm indicator within the data component. (2) It prevents details from being calculated or returned when calling the top-level API. This is to avoid the performance cost of calculating and sending those for each indicator at once.
- Loading branch information
Showing
23 changed files
with
537 additions
and
146 deletions.
There are no files selected for viewing
This file contains 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,6 @@ | ||
pr: 85234 | ||
summary: Health api drill down | ||
area: Health | ||
type: feature | ||
issues: | ||
- 84793 |
This file contains 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 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
18 changes: 18 additions & 0 deletions
18
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/health/20_component.yml
This file contains 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,18 @@ | ||
--- | ||
"cluster health test drilling down into a component": | ||
- skip: | ||
version: "- 8.2.99" | ||
reason: "health drilldown was only added in 8.3.0" | ||
|
||
- do: | ||
_internal.health: | ||
component: cluster_coordination | ||
|
||
- is_true: cluster_name | ||
- match: { components.cluster_coordination.status: "green" } | ||
- match: { components.cluster_coordination.indicators.instance_has_master.status: "green" } | ||
- match: { components.cluster_coordination.indicators.instance_has_master.summary: "Health coordinating instance has a master node." } | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.coordinating_node.node_id | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.coordinating_node.name | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.master_node.node_id | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.master_node.name |
18 changes: 18 additions & 0 deletions
18
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/health/30_feature.yml
This file contains 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,18 @@ | ||
--- | ||
"cluster health test drilling down into a component and a feature": | ||
- skip: | ||
version: "- 8.2.99" | ||
reason: "health drilldown was only added in 8.3.0" | ||
|
||
- do: | ||
_internal.health: | ||
component: cluster_coordination | ||
feature: instance_has_master | ||
|
||
- is_true: cluster_name | ||
- match: { components.cluster_coordination.indicators.instance_has_master.status: "green" } | ||
- match: { components.cluster_coordination.indicators.instance_has_master.summary: "Health coordinating instance has a master node." } | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.coordinating_node.node_id | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.coordinating_node.name | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.master_node.node_id | ||
- is_true: components.cluster_coordination.indicators.instance_has_master.details.master_node.name |
Oops, something went wrong.