Monitoring Tools/ELK Stack
[Elasticsearch] Validation Failed: 1: this action would add [2] shards, but this cluster currently has [999]/[1000] maximum normal shards open
ploz
2023. 3. 27. 11:10
반응형
default shard 개수가 max 수치에 도달하여 수집이 안되는 현상
shard 개수 확인
- "max_shards_per_node": "1000"
curl -u ****:**** -XGET 127.0.0.1:9200/_cluster/settings?include_defaults | jq . | grep shard
"same_shard": {
"total_shards_per_node": "-1",
"shard_state": {
"shard": "0.45"
"max_shards_per_node.frozen": "3000",
"max_shards_per_node": "1000",
"pre_filter_shard_size": {
"shard_count": {
"fetch_shard_started": {
"fetch_shard_store": {
"shard_inactive_time": "5m",
"shard": {
shard 개수를 늘리거나 할당된 index 개수를 줄이면 됨
할당 된 index 확인
curl -u ****:**** -XGET 127.0.0.1:9200/_cat/shards
현재 설정의 경우 단일 node에 index당 shard 1개이므로 하루마다 cycle 되는 index 를 일정 기간 만 남겨주고 삭제함.
shard 개수 늘리기
curl -s -XPUT localhost:9200/_cluster/settings -H "Content-Type: application/json" -d '{ "persistent": { "cluster.max_shards_per_node": "3000" } }'
반응형