Hi CJK
The ILM policy should be like this :
{
"policy": {
"description": " Index lifecycle policy ",
"default_state": "hot ",
"states": [
{
"name": "hot ",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"replica_count": {
"number_of_replicas": 1
}
}
],
"transitions": [
{
"state_name": "warm",
"conditions": {
"min_index_age": "1d"
}
}
]
},
{
"name": "warm",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"replica_count": {
"number_of_replicas": 0
}
}
],
"transitions": [
{
"state_name": "cold",
"conditions": {
"min_index_age": "7d"
}
}
]
},
{
"name": "cold",
"actions": [
{
"retry": {
"count": 10,
"backoff": "exponential",
"delay": "3m"
},
"read_only": {}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "30d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"wazuh-alerts-4.x-*"
],
"priority": 1
}
]
}
}
You don't need to add the "index_priority": { "priority": 5} after every state, and the replica count twice in a state. To know more about ILM policy, please refer to:
https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management
https://documentation.wazuh.com/current/user-manual/wazuh-indexer-cluster/index-lifecycle-management.html
It looks like the warm transition is working fine, as after hot stage, the replica is 1, but the warm actions are waiting for the min index age condition to be fully met the condition and for ISM to run
To confirm this, can you please share the output of:
You can specify the date of any indices that should have 0 replicas by now.
We want the values for the latest index (index_creation_date, state.name, step_status).
That will tell us whether the replica_count action simply needs more time to execute or if there is anything else delaying it.
Hi CJK,
I’ve tested this as well and got the same results as you.
I’ve opened a GitHub issue to track it: https://github.com/wazuh/wazuh-indexer/issues/1199.
You can follow the issue there and add any additional information or observations from your side.