0

我们从 AWS Elasticsearch 2.3 迁移到 5.1,发现我们的旧 curator 3 命令不再适用于删除超过 30 天的索引。我们的旧命令如下所示:

00 00 * * 1 /bin/curator --host elasticsearch.production.domain.aws --port 80 delete indices --older-than 30 --time-unit days --timestring %Y.%m.%d --exclude .kibana

需要迁移到 Curator 4.2.6 以支持 ES 5.1,但是,当使用弹性搜索页面提供的示例时,我们发现我们收到了错误:

2017-02-15 11:46:18,874 INFO      Preparing Action ID: 1, "delete_indices"
2017-02-15 11:46:18,884 INFO      Trying Action ID: 1, "delete_indices": Delete indices older than 45 days (based on index name), for logstash- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly.
2017-02-15 11:46:18,897 ERROR     Failed to complete action: delete_indices.  <class 'KeyError'>: 'settings'

迁移后还有其他人成功使用该配置吗?

我已经单独定义了我认为正确的 curator.yaml 配置:

client:
  hosts:
    - elasticsearch.production.domain.aws
  port: 80
  url_prefix:
  use_ssl: False
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: False
  http_auth:
  timeout: 30
  master_only: False
4

1 回答 1

1

TL;DR: AWS ES 仍然不支持 Curator 使用它所需的 API 调用(嗯,他们支持,但它不返回必要的数据)。

尽管 AWS ES 似乎确实添加了必要的/_cluster/state端点(这就是 Curator 4 不支持 AWS ES 2.3 的原因),但他们似乎已经从该端点省略了一些必要的数据(这就是你得到的部分<class 'KeyError'>: 'settings'settings子JSON 响应中的对象丢失,因此 Curator 无法完成其任务。

Curator 中已经有一个未解决的问题:https ://github.com/elastic/curator/issues/880 ,尽管我不认为 Curator 可以做任何事情来克服这个问题。

于 2017-02-16T00:40:05.873 回答