简体   繁体   English

ELK logstash 翻转索引没有代表分片

[英]ELK logstash rollover index doesn't has rep shards

I use elk.我用麋鹿。 And my logstash enabled rollover.index template 5 pri shards 1 rep shards.我的 logstash 启用了 rollover.index 模板 5 个 pri 分片 1 个 rep 分片。 But only the current index has rep shards,old indexs only has pri shards.但是只有当前索引有 rep 分片,旧索引只有 pri 分片。 How to make old indexs also has 5 pri shards and 1 rep shards?如何使旧索引也有 5 个 pri 分片和 1 个 rep 分片?

# GET /_cat/indices?v
health status index                               uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   cloud-logs-2022.03.02-000046        ycvYYKEtRZSJxR8wwdJlqQ   5   0  128888646            0     52.1gb         52.1gb
green  open   cloud-logs-2022.03.02-000047        JclF5gpoTxKvBpPuTuy-jQ   5   1   42849847            0     37.3gb         18.6gb
# GET /_template
{
"cloud-log": {
        "order": 1,
        "index_patterns": [
            "cloud-logs-*"
        ],
        "settings": {
            "index": {
                "lifecycle": {
                    "name": "logstash-policy",
                    "rollover_alias": "cloud-logs"
                },
                "codec": "best_compression",
                "mapping": {
                    "total_fields": {
                        "limit": "10000"
                    }
                },
                "refresh_interval": "30s",
                "number_of_shards": "5",
                "query": {},
                "number_of_routing_shards": "30",
                "number_of_replicas": "1"
            }
        },
        "mappings": {},
        "aliases": {}
    }
}

Your logstash-policy ILM policy that governs the lifecycle of your cloud-logs-* indexes probably states that when the index rolls over, the number of replica shards should be decreased from 1 to 0.管理cloud-logs-*索引生命周期的logstash-policy ILM 策略可能声明当索引回滚时,副本分片的数量应从 1 减少到 0。

You can change that directly in Kibana > Stack management > Index lifecycle policy您可以直接在 Kibana > Stack management > Index lifecycle policy 中更改它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM