参数说明:
persistent 表示为永久修改,重启以后也会保存设置
transient 表示临时修改,重启以后不会保存设置
cluster.routing.allocation.disk.watermark.low
:控制磁盘最小使用率,默认85%。说明es在磁盘使用率达到85%的时候将会停止分配新的shard。也可以设置为一个绝对数值,比如500M。
cluster.routing.allocation.disk.watermark.high
:控制磁盘的最大使用率,默认90%。说明在磁盘使用率达到90%的时候es将会relocate shard去其他的节点。同样也可以设置为一个绝对值。cluster.info.update.interval:设置时间间隔收集各个节点磁盘的使用情况,默认每隔30s
PUT /_cluster/settings
{
"persistent": {
"cluster.routing.allocation.disk.watermark.low": "90%",
"cluster.routing.allocation.disk.watermark.high": "95%",
"cluster.info.update.interval": "1m"
}
}