Kibana Elasticsearch索引崩溃

xtupzzrd  于 5个月前  发布在  Kibana
关注(0)|答案(1)|浏览(90)

当删除阶段策略必须删除最后一个索引时,它不会删除它,还会再次添加别名。
GET _alias

"index-000113" : {
    "aliases" : {
      "index" : { }
    }
  },
  "index-000114" : {
    "aliases" : { }
  },
  "index-000115" : {
    "aliases" : { }
  },
  "index-000116" : {
    "aliases" : {
      "index" : { }
    }
  },

字符串
我的配置有3个节点,1个主节点和2个从节点。我的解决方案是手动删除应该由删除策略删除的索引

POST _aliases
{
  "actions": [
    {
      "remove": {
        "index": "index-000113",
        "alias": "index"
      }
    }
  ]
}


我最后的碎片在木花的活动
公司简介
Shard:0 /n Recovery type:Peer Done(node01 > node03)
公司简介
Shard:0 / Primary Recovery type:Existing_store Done(n/a > node03)
似乎最后一个活动与它有关,我不知道它意味着什么。有人知道它为什么会发生,有什么解决办法吗?
我看了官方文件,但我找不到原因。

fhg3lkii

fhg3lkii1#

_aliases API删除操作不是删除index,而是alias。要删除索引,您可以使用remove_index操作。

add - Adds a data stream or index to an alias. If the alias doesn’t exist, the add action creates it.
remove -  Removes a data stream or index from an alias.
remove_index - Deletes an index. You cannot use this action on aliases or data streams.

字符串
检查以下内容:
1.检查ILM策略GET _ilm/policy/<policy_id>
1.使用解释索引ILM策略API GET <index_name>/_ilm/explain
1.使用dry_run POST <index_pattern>/_rollover?dry_run=true测试翻转,您的索引模式为index
名为index的别名看起来像你的write_alias。当索引翻转时,别名必须切换到最新的索引。如果没有,尝试将is_write_index:true添加到索引模板。如果你再次卡住,请创建另一个翻转索引并从头开始。

相关问题