Hello all,
can any one help me to get the ILM wrong,
I created ILM for support the retention period so everything is well but the new rollover indices doesn't store any data (the docs count is 0), I need to move the data from the primary index to the rollover indices
The steps I make it
(1) create ILM
{
"name-ilm" : {
"version" : 1,
"modified_date" : "2023-03-09T12:35:03.173Z",
"policy" : {
"phases" : {
"hot" : {
"min_age" : "0ms",
"actions" : {
"rollover" : {
"max_size" : "15gb",
"max_age" : "1d"
},
"set_priority" : {
"priority" : 50
}
}
},
"delete" : {
"min_age" : "3d",
"actions" : {
"delete" : {
"delete_searchable_snapshot" : true
}
}
},
"warm" : {
"min_age" : "2d",
"actions" : {
"forcemerge" : {
"max_num_segments" : 1
},
"set_priority" : {
"priority" : 25
},
"shrink" : {
"number_of_shards" : 1
}
}
}
}
}
}
}
(2) Create index template
{
"index_templates" : [
{
"name" : "name_template",
"index_template" : {
"index_patterns" : [
"----------*"
],
"template" : {
"settings" : {
"index" : {
"lifecycle" : {
"name" : "name_ilm",
"rollover_alias" : "alies"
},
"number_of_shards" : "1",
"number_of_replicas" : "1"
}
}
},
"composed_of" : [ ],
"data_stream" : {
"hidden" : false
}
}
}
]
}
(3) create data stream
{
"data_streams" : [
{
"name" : "data stream name",
"timestamp_field" : {
"name" : "@timestamp"
},
"indices" : [
{
"index_name" : ".ds----------------2023.03.09-000001",
"index_uuid" : "9XApgngTSnSM8T_KVcVvtA"
},
{
"index_name" : ".ds----------------2023.03.10-000002",
"index_uuid" : "mZohckWQTwqSmCuoRGLHrQ"
},
{
"index_name" : ".ds--------------2023.03.11-000003",
"index_uuid" : "XKE0Bn0NQFyH6Zh0rEnKjQ"
}
],
"generation" : 3,
"status" : "GREEN",
"template" : "name_template",
"ilm_policy" : "name_ilm",
"hidden" : false
}
]
}