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) 来保证时间计算正确

       

  • 相关阅读:
    微信小程序实战,与后台交互
    微信小程序开发笔记
    微信小程序 之页面跳转
    小程序(四):模板
    (1)Appium基础操作API
    ADB命令
    移动端测试知识概览
    计算机网络常见面试题
    pip命令
    随笔-记录一些简单内容
  • 原文地址:https://www.cnblogs.com/xuchenCN/p/14781030.html
Copyright © 2011-2022 走看看