【问题标题】:AWS Elasticsearch 5.1 with Curator 4.2.6 - Delete indices doesn't work?带有 Curator 4.2.6 的 AWS Elasticsearch 5.1 - 删除索引不起作用?
【发布时间】:2017-07-03 11:59:45
【问题描述】:

我们已从 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,但是,当使用 from the elasticsearch page 提供的示例时,我们发现我们收到了错误:

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

【问题讨论】:

  • 我们也可以看看 curator.yaml 吗?
  • 使用 curator.yml 文件更新

标签: amazon-web-services elasticsearch elasticsearch-curator


【解决方案1】:

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

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

Curator 中已经有一个未解决的问题:https://github.com/elastic/curator/issues/880,尽管我认为 Curator 无法解决这个问题。

【讨论】:

  • 干杯 untergeek。作为一项临时措施,我们将只针对 X 天之前的所有索引运行 HTTP DELETE。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-06-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多