🕰️ 작성일 : 2024.03.22
# Index를 warm으로 이동
POST _ultrawarm/migration/coinone-test/_warm
# Warm Index 조회
GET _warm
# Cold Storage로 이동
POST _ultrawarm/migration/coinone-test/_cold?ignore=timestamp
# Cold Storage의 인덱스 확인
GET _cold/indices/_search
# Cold Storage의 인덱스 읽기 시도 -> 읽기 시도 실패(Cold에 있기 때문)
GET coinone-test/_search
{
"policy": {
"description": "Demonstrate a hot-warm-cold-delete workflow.",
"default_state": "hot",
"schema_version": 1,
"states": [{
"name": "hot",
"actions": [],
"transitions": [{
"state_name": "warm",
"conditions": {
"min_index_age": "10d"
}
}]
},
{
"name": "warm",
"actions": [{
"warm_migration": {},
"retry": {
"count": 5,
"delay": "1h"
}
}],
"transitions": [{
"state_name": "cold",
"conditions": {
"min_index_age": "90d"
}
}]
},
{
"name": "cold",
"actions": [{
"cold_migration": {
"timestamp_field": "<your timestamp field>"
}
}
],
"transitions": [{
"state_name": "delete",
"conditions": {
"min_index_age": "365d"
}
}]
},
{
"name": "delete",
"actions": [{
"notification": {
"destination": {
"chime": {
"url": "<URL>"
}
},
"message_template": {
"source": "The index {{ctx.index}} is being deleted."
}
}
},
{
"cold_delete": {}
}]
}
]
}
}