We have setup an ES cluster(version 8.11.0) using ECK with xpack.security enabled and are getting the following error while trying to hit the "/_stats" API -
Sample curl request -
curl --location 'http://localhost:9200/_stats'
Error response -
{
"_shards": {
"total": 10,
"successful": 0,
"failed": 10,
"failures": [
{
"shard": 0,
"index": "test_index",
"status": "INTERNAL_SERVER_ERROR",
"reason": {
"type": "failed_node_exception",
"reason": "Failed node [5-i-JJzsR6OPmdlr4Pc0ag]",
"node_id": "5-i-JJzsR6OPmdlr4Pc0ag",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "the action indices:monitor/stats[n] does not support wildcards; the provided index expression(s) [*] are not allowed"
}
}
}
]
},
"_all": {
"primaries": {},
"total": {}
},
"indices": {}
}
When we try to get a specific index's stats, that works fine -
Sample curl request -
curl --location 'http://localhost:9200/test_index/_stats'
Snippet of the successful response -
{
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"_all": {
"primaries": {
"docs": {
"count": 14097379,
"deleted": 1151323
},
...
},
"total": {
"docs": {
"count": 14097379,
"deleted": 1151323
},
...
}
},
"indices": {
"test_index": {
"uuid": "NhyCjP_QQLC8TZE24GpvcQ",
"health": "green",
"status": "open",
"primaries": {
"docs": {
"count": 14097379,
"deleted": 1151323
},
...
},
"total": {
"docs": {
"count": 14097379,
"deleted": 1151323
},
...
}
}
}
}
We have an existing ES cluster(version 7.16.3) with xpack.security disabled and the aforementioned "/_stats" request works fine there.
Can someone from the Elastic team please help confirm if we need to explicitly enable support for wildcards if xpack.security is enabled; and if yes, how can we achieve that since we could not find any supporting documentation.