0

我正在尝试使用 curator 4 拍摄弹性索引的快照。(Windows 机器)出现以下错误(所有操作都出现相同的错误)。

未能完成操作:快照。: 不是 IndexList 对象。类型:

当我们得到这个的时候知道吗?我正在遵循文档中提供的示例

https://www.elastic.co/guide/en/elasticsearch/client/curator/current/snapshot.html

Action yaml file :
    actions:
  1:
    action: snapshot
    description: >-
      Snapshot logstash- prefixed indices older than 1 day (based on index
      creation_date) with the default snapshot name pattern of
      'curator-%Y%m%d%H%M%S'.  Wait for the snapshot to complete.  Do not skip
      the repository filesystem access check.  Use the other options to create
      the snapshot.
    options:
      repository: myrepo    
      name: shan
      ignore_unavailable: False
      include_global_state: True
      partial: False
      wait_for_completion: True
      skip_repo_fs_check: False
      timeout_override:
      continue_if_exception: False
      disable_action: False
    filters:    
    - filtertype: age
      source: creation_date
      direction: younger      
      unit: days
      unit_count: 1
      field:
      stats_result:
      epoch:
      exclude:

输出 :

2016-07-25 22:16:40,929 INFO      Action #1: snapshot
2016-07-25 22:16:40,929 INFO      Starting new HTTP connection (1): 127.0.0.1
2016-07-25 22:16:40,944 INFO      GET http://127.0.0.1:9200/ [status:200 request:0.015s]
2016-07-25 22:16:40,946 INFO      GET http://127.0.0.1:9200/_all/_settings?expand_wildcards=open%2Cclosed [status:200 request:0.002s]
2016-07-25 22:16:40,950 INFO      GET http://127.0.0.1:9200/_cluster/state/metadata/.marvel-es-1-2016.06.27,.marvel-es-1-2016.06.28,.marvel-es-1-2016.06.29,.marvel-es-1-2016.06.30,.marvel-es-data-1,shan-claim-1 [status:200 request:0.004s]
2016-07-25 22:16:40,993 INFO      GET http://127.0.0.1:9200/.marvel-es-1-2016.06.27,.marvel-es-1-2016.06.28,.marvel-es-1-2016.06.29,.marvel-es-1-2016.06.30,.marvel-es-data-1,shan-claim-1/_stats/store,docs [status:200 request:0.042s]
2016-07-25 22:16:40,993 ERROR     Failed to complete action: snapshot.  <class 'TypeError' at 0x000000001DFCC400>: Not an IndexList object. Type: <class 'curator.indexlist.IndexList' at 0x0000000002DB39B8>.
4

2 回答 2

0

您需要添加另一个过滤器类型,以便管理员知道要针对哪些索引运行。例如,如果您的索引被命名为 logstash-您的过滤器看起来像

filters:
- filtertype: pattern
  kind: prefix
  value: logstash-
  exclude:
- filtertype: age
  source: creation_date
  direction: younger      
  unit: days
  unit_count: 1
  field:
  stats_result:
  epoch:
  exclude:
于 2016-10-05T03:58:21.837 回答
0

您的文件开头有一个错误的标识。动作列表应该在“动作”关键字内。这是您的根级别。

于 2020-07-16T11:33:00.927 回答