Please try creating the policy
PUT _ilm/policy/wazuh-hot-cold-policy
{
"policy": {
"phases": {
"hot": { "actions": { "rollover": { "max_age": "30d", "max_size": "50gb" } } },
"cold": {
"actions": {
"allocate": { "require": { "temp": "cold" } },
"forcemerge": { "max_num_segments": 1 },
"set_priority": { "priority": 0 }
}
}
}
}
}
then assign the polixy to indeces
PUT _index_template/wazuh-hot-cold-template
{
"index_patterns": ["wazuh-alerts-*"],
"template": { "settings": { "
index.lifecycle.name": "wazuh-hot-cold-policy" } }
}
check the status
GET _ilm/policy/wazuh-hot-cold-policy?pretty
GET _ilm/explain/wazuh-alerts-2024.01.01
GET _cat/indices?v
decompress data when required
POST wazuh-alerts-2024.01.01/_refresh
POST wazuh-alerts-2024.01.01/_forcemerge?max_num_segments=5
it is possible that you need to adapt/modify/troubleshoot in your environment to reach the final result, please let me know