zoukankan      html  css  js  c++  java
  • Elasticsearch ILM delete not working

    1. 检查 policy.delete.actions是否为空 

       

    {
      "test-kibana-index-lifecycle-policy" : {
        "version" : 3,
        "modified_date" : "2021-05-18T06:27:51.498Z",
        "policy" : {
          "phases" : {
            "hot" : {
              "min_age" : "0ms",
              "actions" : {
                "set_priority" : {
                  "priority" : 100
                }
              }
            },
            "delete" : {
              "min_age" : "30d",
              "actions" : {
                "delete" : {
                  "delete_searchable_snapshot" : true
                }
              }
            }
          }
        }
      }
    }
    

      

    2. 检查 ILM的 operation_mode

    GET _ilm/status
    
    {
      "operation_mode" : "RUNNING"
    }
    

      

    3. 检查index的状态

    {
      "indices" : {
        "logstash-2021.02.26" : {
          "index" : "logstash-2021.02.26",
          "managed" : true,
          "policy" : "test-kibana-index-lifecycle-policy",
          "lifecycle_date_millis" : 1619145416884,
          "age" : "25.18d",
          "phase" : "hot",
          "phase_time_millis" : 1621319688074,
          "action" : "complete",
          "action_time_millis" : 1621319688108,
          "step" : "complete",
          "step_time_millis" : 1621319688108,
          "phase_execution" : {
            "policy" : "test-kibana-index-lifecycle-policy",
            "phase_definition" : {
              "min_age" : "0ms",
              "actions" : {
                "set_priority" : {
                  "priority" : 100
                }
              }
            },
            "version" : 3,
            "modified_date_in_millis" : 1621319271498
          }
        }
      }
    }
    

      由于age不到30天,所以没有删除,可以设置index.lifecycle.origination_date (parse_origination_date) 来保证时间计算正确

       

  • 相关阅读:
    Java面向对象编程 -5
    Java面向对象编程 -4.3
    Java面向对象编程 -4.2
    Java面向对象编程 -4
    Java面向对象编程 -3.3
    Java面向对象编程 -3.2
    Java面向对象编程 -3
    自解压格式的命令
    windows批处理命令学习
    使用自解压格式
  • 原文地址:https://www.cnblogs.com/xuchenCN/p/14781030.html
Copyright © 2011-2022 走看看