elasticsearch 修改磁盘比例限制

es节点所在的磁盘空间不够用的时候,es会将改节点上面的索引标位只读,不能向改索引写入数据,默认当磁盘空间超过85%,我们可以使用下面的命令调整磁盘空间比例为95%
[2020-12-02T10:23:24,775][WARN ][o.e.c.r.a.DiskThresholdMonitor] [Nii770G] flood stage disk watermark [95%] exceeded on [Nii770GyRDC4Xu99SOLKJw][Nii770G][C:ELKelasticsearch-6.2.4elasticsearch-6.2.4data odes] free: 2.5gb[3.1%], all indices on this node will marked read-only
PUT /_cluster/settings { "transient": { "cluster.routing.allocation.disk.watermark.low": "90%", "cluster.routing.allocation.disk.watermark.high": "95%", "cluster.info.update.interval": "1m" } }

persistent表示为永久修改,重启以后也会保存设置

transient表示临时修改,重启以后不会保存设置

"cluster.info.update.interval": "1m"   #时间间隔 现在是1分钟,默认是30s

  1. PUT /_cluster/settings
  2.  
    {
  3.  
    "transient": {
  4.  
    "cluster.routing.allocation.disk.watermark.low": "90%",
  5.  
    "cluster.routing.allocation.disk.watermark.high": "95%",
  6.  
    "cluster.info.update.interval": "1m"
  7.  
    }
  8.  
    }
原文地址:https://www.cnblogs.com/kebibuluan/p/14077043.html