我试图在AWS Elasticsearch服务v7.8上使用带有opendistro的ISM。我正在尝试建立一个基本的展期/删除策略,而这个策略似乎并没有触发。我想我做错了什么,但我似乎找不到.我每小时使用一次滚动测试,6小时后删除.
以下是我的ISM策略,我将其命名为"test":
{
"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 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
]
}在某种程度上,我看到托管索引信息从“初始化”到
{
"message": "Successfully initialized policy: test"
}在这一点上,什么都没有发生。在基班纳的ISM控制台中,"atest-000001“的行表示"state”为“活动”,"action“为"-”,“作业状态”为“运行”。这种情况会持续几天..。我也尝试过:
PUT _cluster/settings
{
"persistent": {
"opendistro.index_state_management.enabled" : true
}
}还是没有触发。我做错了什么?
发布于 2020-12-01 20:27:36
原来是内部AWS的事。更新到R20201117解决了这个问题。
https://stackoverflow.com/questions/64809587
复制相似问题