es磁盘满了无法写入的处理办法

环境:

OS:Centos 7

es:6.8.5

1.查看index的只读状态

-bash-4.2$ curl -u elastic:elastic -H "Content-Type: application/json" -XGET "http://192.168.1.109:19200/app_message_all/_settings?pretty=true"
{
  "app_message_all" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "5",
        "blocks" : {
          "read_only_allow_delete" : "true"
        },
        "provided_name" : "app_message_all",
        "creation_date" : "1698133863992",
        "number_of_replicas" : "1",
        "uuid" : "Df6FxfizTSmeClUu9rom9g",
        "version" : {
          "created" : "6080599"
        }
      }
    }
  }
}

 

-bash-4.2$ curl -u elastic:elastic -H "Content-Type: application/json" -XGET "http://192.168.1.109:19200/.security-6/_settings?pretty=true"
{
  ".security-6" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "1",
        "auto_expand_replicas" : "0-1",
        "blocks" : {
          "read_only_allow_delete" : "true"
        },
        "provided_name" : ".security-6",
        "format" : "6",
        "creation_date" : "1698054370201",
        "analysis" : {
          "filter" : {
            "email" : {
              "type" : "pattern_capture",
              "preserve_original" : "true",
              "patterns" : [
                "([^@]+)",
                "(\\p{L}+)",
                "(\\d+)",
                "@(.+)"
              ]
            }
          },
          "analyzer" : {
            "email" : {
              "filter" : [
                "email",
                "lowercase",
                "unique"
              ],
              "tokenizer" : "uax_url_email"
            }
          }
        },
        "priority" : "1000",
        "number_of_replicas" : "0",
        "uuid" : "GWBAK8K8SjmIMraSC2rhpQ",
        "version" : {
          "created" : "6080599"
        }
      }
    }
  }
}

 

 

 

 

2.关闭磁盘告警
curl -X PUT "192.168.1.135:19200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
"transient": {
"cluster.routing.allocation.disk.watermark.low": null,
"cluster.routing.allocation.disk.watermark.high": null,
"cluster.routing.allocation.disk.watermark.flood_stage": null
}
}
'

3.设置索引read_only状态
curl -H "Content-Type: application/json" -XPUT 'http://192.168.1.135:19200/.security-6/_settings' -d '{
"index.blocks.read_only_allow_delete" : null
}'

 

posted @ 2022-04-27 18:05  slnngk  阅读(717)  评论(0编辑  收藏  举报