My old data is not deleting don't know why
PUT _ilm/policy/prudhviilm
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "5m"
}
}
},
"warm": {
"min_age": "5m",
"actions": {}
},
"cold": {
"min_age": "8m",
"actions": {}
},
"delete": {
"min_age": "14m",
"actions": {
"delete": {}
}
}
}
}
}
PUT _component_template/prudhvicomponent
{
"template": {
"settings": {
"number_of_replicas": 1,
"number_of_shards": 1,
"index.lifecycle.name": "prudhviilm"
}
}
}
GET _data_stream/pru-dec-2022
{
"data_streams": [
{
"name": "pru-dec-2022",
"timestamp_field": {
"name": "@timestamp"
},
"indices": [
{
"index_name": ".ds-pru-dec-2022-2022.12.20-000002",
"index_uuid": "gFUMXHcLTdGFA43eYMACTw"
},
{
"index_name": ".ds-pru-dec-2022-2022.12.20-000003",
"index_uuid": "hRbD9hiWTKSyDj2N-T40Lw"
}
],
"generation": 4,
"status": "GREEN",
"template": "logs-index-template",
"ilm_policy": "prudhviilm",
"hidden": false,
"system": false,
"allow_custom_routing": false,
"replicated": false
}
]
}
PUT _index_template/logs-index-template
{
"index_patterns": ["pru--"],
"data_stream": { },
"composed_of": ["prudhvicomponent"]
}
POST pru-dec-2022/_doc
{
"@timestamp":"2022-12-20T09:20:07.000Z",
"message": "I am logged"
}
POST pru-dec-2022/_doc
{
"@timestamp":"1671528152378",
"message": "I am logged"
}