elastic / elastic/elasticsearch
Docs: health_report/indicator/diagnosis/affected_resources value type mismatch
- Dominant language
- Java
- Stars
- 77.9k
- Forks
- 26.1k
- PR merge metrics
- PR metrics pending
Description
### Elasticsearch Version
8.13.0
### Installed Plugins
_No response_
### Java Version
_bundled_
### OS Version
NA
### Problem Description
The docs claim that an indicator's diagnosis' `affected_resources` is an "(Optional, array of strings)":
> ~~~ asciidoc
> `affected_resources`::
> (Optional, array of strings) If the root cause pertains to multiple resources in the
> cluster (like indices, shards, nodes, etc...) this will hold all resources that this
> diagnosis is applicable for.
> ~~~
> -- [docs/reference/health/health.asciidoc:206-209@v8.13.0](https://github.com/elastic/elasticsearch/blob/v8.13.0/docs/reference/health/health.asciidoc?plain=1#L206-L209)
I am observing that the value can be an _object_ that contains a mapping of strings to arrays-of-strings:
> ~~~ json
> {
> "id": "elasticsearch:health:shards_availability:diagnosis:increase_tier_capacity_for_allocations:tier:data_content",
> "cause": "Elasticsearch isn't allowed to allocate some shards from these indices to any of the nodes in the desired data tier because there are not enough nodes in the [data_content] tier to allocate each shard copy on a different node.",
> "action": "Increase the number of nodes in this tier or decrease the number of replica shards in the affected indices.",
> "help_url": "https://ela.st/tier-capacity",
> "affected_resources": {
> "indices": [
> "logstash-test"
> ]
> }
> }
> ~~~
> -- `GET /_health_report`
I do not have enough context to know whether the shape is _always_ a map of resource-type to list-of-resources, or if that is simply the case for the diagnosis with id `elasticsearch:health:shards_availability:diagnosis:increase_tier_capacity_for_allocations:tier:data_content`.
### Steps to Reproduce
`GET /_health_report`
### Logs (if relevant)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.