![](/img/trans.png)
[英]Authentication error - Security exception while creating an ISM policy aws elasticsearch
[英]Opendistro for Elasticsearch - ISM is not triggering jobs
我正在尝试在 AWS Elasticsearch 服务 v7.8 上将 ISM 与 opendistro 结合使用。 我正在尝试设置一个基本的翻转/删除策略,但该策略似乎没有触发。 我假设我做错了什么,但我似乎无法追踪它......我正在测试它每小时使用翻转并在 6 小时后删除......
这是我的 ISM 政策,我将其命名为“测试”:
{
"policy": {
"policy_id": "test",
"description": "A test policy",
"last_updated_time": 1605196195481,
"schema_version": 1,
"error_notification": null,
"default_state": "active",
"states": [{
"name": "active",
"actions": [{
"rollover": {
"min_index_age": "1h"
}
}],
"transitions": [{
"state_name": "delete",
"conditions": {
"min_index_age": "6h"
}
}]
},
{
"name": "delete",
"actions": [{
"delete": {}
}],
"transitions": []
}
]
}
}
我创建了一个模板来维护索引创建等。这是模板。 请注意,我正在添加翻转别名“atest”,但 policy_id 是“test”。 我没有将索引添加到此模板中的任何别名:
PUT /_template/atest
{
"index_patterns" : [
"atest-*"
],
"settings" : {
"index" : {
"opendistro" : {
"index_state_management" : {
"policy_id" : "test",
"rollover_alias" : "atest"
}
},
"analysis" : {
}
}
},
"mappings" : {
},
"aliases" : { }
}
然后,我使用模板中的索引模式创建一个索引,并将其添加到我在上面定义为翻转别名的内容中:
PUT /atest-000001
{
"aliases": {"atest": {}}
}
然后我可以在 opendistro-ism-config 索引中看到文档:
{
"_index": ".opendistro-ism-config",
"_type": "_doc",
"_id": "T_k8jMI5RvuWRaLp1tY_hg",
"_version": 2,
"_score": null,
"_source": {
"managed_index": {
"name": "atest-000001",
"enabled": true,
"index": "atest-000001",
"index_uuid": "T_k8jMI5RvuWRaLp1tY_hg",
"schedule": {
"interval": {
"start_time": 1605200587242,
"period": 30,
"unit": "Minutes"
}
},
"last_updated_time": 1605200587242,
"enabled_time": 1605200587242,
"policy_id": "test",
"policy_seq_no": 422,
"policy_primary_term": 111,
"policy": {
"policy_id": "test",
"description": "A test policy",
"last_updated_time": 1605196195481,
"schema_version": 1,
"error_notification": null,
"default_state": "active",
"states": [
{
"name": "active",
"actions": [
{
"rollover": {
"min_index_age": "1h"
}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "6h"
}
}
]
},
{
"name": "delete",
"actions": [
{
"delete": {}
}
],
"transitions": []
}
]
},
"change_policy": null
}
},
"fields": {
"managed_index.last_updated_time": [
"2020-11-12T17:03:07.242Z"
],
"policy.last_updated_time": [],
"policy.states.actions.notification.destination.last_update_time": [],
"policy.error_notification.destination.last_update_time": [],
"managed_index.schedule.interval.start_time": [
"2020-11-12T17:03:07.242Z"
],
"managed_index.enabled_time": [
"2020-11-12T17:03:07.242Z"
]
},
"sort": [
1605200587242
]
}
在某些时候,我看到托管索引信息 go 从“初始化”到
{
"message": "Successfully initialized policy: test"
}
此时,什么也没有发生。 kibana 中 ISM 控制台中“atest-000001”的行表示“状态”为“活动”,“操作”为“-”,“作业状态”为“正在运行”。 它会保持这样几天......我也试过:
PUT _cluster/settings
{
"persistent": {
"opendistro.index_state_management.enabled" : true
}
}
仍然没有触发。 我究竟做错了什么?
原来这是一个内部的 AWS ES 东西。 更新到 R20201117 解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.