gpt4 book ai didi

amazon-web-services - 如何在AWS Elasticsearch中应用生命周期模式太多索引

转载 作者:行者123 更新时间:2023-12-02 23:09:14 26 4
gpt4 key购买 nike

我正在尝试在AWS elasticsearch中进行this的创建,从而为application-logs-*模式创建模板,然后为与该表达式匹配的所有索引应用索引策略log-rotation-policy。我已经成功创建了策略,但是当我尝试创建如下模板时:

PUT _template/application-logs
{
"index_patterns" : [
"application-logs-*"
],
"settings" : {
"index.lifecycle.name": "log-rotation-policy",
}
}

我收到一个错误:
    "type": "illegal_argument_exception",
"reason": "unknown setting [index.policy_id] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"

AWS文档非常 vague

最佳答案

好的,很抱歉,我以为我还是会发布这个答案,因为在写这篇文章时,我发现了问题所在,正确使用的键是:opendistro.index_state_management.policy_id,因此应该是:

PUT _template/application-logs
{
"index_patterns" : [
"application-logs-*"
],
"settings" : {
"opendistro.index_state_management.policy_id": "log-rotation-policy",
}
}

我找到了答案 here

关于amazon-web-services - 如何在AWS Elasticsearch中应用生命周期模式太多索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62125149/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com