curator-cli 和 curator 操作文件之间的区别

Difference between curator-cli and curator action files

我遇到了一个类似的问题 post,但找不到解决方案:https://github.com/elastic/curator/issues/1513

为了对我的 Elasticsearch 集群 (7.7.1) 进行快照,我使用 curator (5.8) 每天对所有索引进行快照。 我今天意识到只有我的指数以“。”开头。正在被 Curator 抓拍。

如果我使用 curator-cli,所有索引确实都被 curator 看到并被快照了。

我试图删除我的操作文件中的所有过滤器,将它们替换为:

filters:
  - filtertype: none

似乎没有任何效果,我的试运行总是最终列出所有以点开头的索引。

这是我的动作文件:


---
actions:
  1:
    action: snapshot
    description: >-
      Snapshot all indices
    options:
      repository: backup
      name: testbackup6
      ignore_unavailable: False
      include_global_state: True
      partial: False
      wait_for_completion: True
      skip_repo_fs_check: False
      disable_action: False
    filters:
    - filtertype: none

策展人日志(我已经匿名化了一些结果)

2021-01-08 18:34:44,021 INFO      DRY-RUN: snapshot: testbackup6 in repository backup with arguments: {'ignore_unavailable': False, 'include_global_state': True, 'partial': False, 'indices': '.apm-XXX,.apm-customXXX,.async-sXXX,.kibana_1,.kibana_task_manager_1,.monitoring-alerts-7,.monitoring-es-7-2021.01.02,.monitoring-es-7-2021.01.03,.monitoring-es-7-2021.01.04
...
,.triggered_watches,.watches'}

我去看了DEBUG日志,indices lifecycle好像有问题。 这里有一些 accepted/rejected 索引:

2021-01-08 19:54:07,925 DEBUG          curator.indexlist       __not_actionable:39   Index XXXX_supervision-server_logs-2020.12.31-000014 is not actionable, removing from list.

2021-01-08 19:54:07,925 DEBUG          curator.indexlist            __excludify:58   **Removed** from actionable list: XXX_supervision-server_logs-2020.12.31-000014 has index.lifecycle.name XXX_supervision-server_logs-policy

2021-01-08 19:54:07,925 DEBUG          curator.indexlist           __actionable:35   Index .monitoring-es-7-2021.01.05 is actionable and remains in the list.

2021-01-08 19:54:07,925 DEBUG          curator.indexlist            __excludify:58   **Remains** in actionable list: index.lifecycle.name is not set for index .monitoring-es-7-2021.01.05

2021-01-08 19:54:07,925 DEBUG          curator.indexlist       __not_actionable:39   Index XXX_logs-2021.01.05-000019 is not actionable, removing from list.

有没有人遇到过这种情况? 我看不到具有 ILM 策略的索引和不匹配它们的策展人之间的 link。

我找不到使用正则表达式来帮助我匹配所有索引的解决方法。在 curator-cli 上使用相同的“filtertype: none”,一切正常。

非常感谢

我刚找到它><

"allow_ilm_indices:必须在操作文件中添加 True" 才能显示所有索引...

curator_cli这个选项默认是True的,curator本身是没有的