我已经为测试创建了以下ILM策略:
{
"test-1-m": {
"version": 6,
"modified_date": "2022-12-07T11:27:55.648Z",
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_primary_shard_size": "10mb",
"max_age": "1m"
}
}
},
"delete": {
"min_age": "1m",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
},
"in_use_by": {
"indices": [
"monitoring-logstash-alias-000008",
"monitoring-logstash-alias-000009",
"monitoring-logstash-alias-000010"
],
"data_streams": [],
"composable_templates": [
"monitoring-logstash-alias"
]
}
}
}
shard在10分钟后滚过,而不是配置的1分钟。10mb的阈值根本没有应用。
我错过了什么吗?
检查集群的indices.lifecycle.poll_interval
设置,它会影响集群的整体滚转策略
在开发工具中使用以下命令来确定集群的当前值:
GET _cluster/settings
这个命令将允许您将当前值更改为您想要的值:
PUT _cluster/settings
{
"transient": {
"indices.lifecycle.poll_interval": "5s"
}
}