harijld
(hari)
October 31, 2022, 1:35pm
1
Hi Team, Small query.
I have created one life cycle policy to delete old indices from Elasticsearch. It is running fine but its not deleting old indices. I am still able to access old indices and able to see the data from old indices.
its very simple delete script.
PUT _ilm/policy/deleteoldindex
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_primary_shard_size": "5gb",
"max_age": "2d"
}
}
},
"delete": {
"min_age": "2d",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
}
}
Is there any problem with my script / request .
warkolm
(Mark Walkom)
October 31, 2022, 11:20pm
2
Can you run an explain on one of the indices you think should be deleted?
harijld
(hari)
November 1, 2022, 1:56pm
3
HI @warkolm ,
Please find the detaisl -
GET tibco-app-logs-116.10.2022/_ilm/explain
{
"indices": {
"tibco-app-logs-116.10.2022": {
"index": "tibco-app-logs-116.10.2022",
"managed": true,
"policy": "deleteoldindex",
"index_creation_date_millis": 1667309258853,
"time_since_index_creation": "24.42m",
"lifecycle_date_millis": 1667309258853,
"age": "24.42m",
"phase": "hot",
"phase_time_millis": 1667309978659,
"action": "rollover",
"action_time_millis": 1667309258894,
"step": "ERROR",
"step_time_millis": 1667310578576,
"failed_step": "check-rollover-ready",
"is_auto_retryable_error": true,
"failed_step_retry_count": 1,
"step_info": {
"type": "illegal_argument_exception",
"reason": "setting [index.lifecycle.rollover_alias] for index [tibco-app-logs-116.10.2022] is empty or not defined"
},
"phase_execution": {
"policy": "deleteoldindex",
"phase_definition": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_primary_shard_size": "5gb",
"max_age": "5m"
}
}
},
"version": 8,
"modified_date_in_millis": 1667309212341
}
}
}
}
BUt alias is already there for this indice.
GET _cat/aliases
.kibana-event-log-8.4.2 .kibana-event-log-8.4.2-000001 - - - true
.kibana_security_session .kibana_security_session_1 - - - -
.kibana .kibana_8.4.2_001 - - - -
.kibana_8.4.2 .kibana_8.4.2_001 - - - -
.security-profile .security-profile-8 - - - -
.kibana_task_manager .kibana_task_manager_8.4.2_001 - - - -
.kibana_task_manager_8.4.2 .kibana_task_manager_8.4.2_001 - - - -
.security .security-7 - - - -
my_alias tibco-app-logs-116.10.2022 - - - -
test_indices tibco-app-logs-116.10.2022 - - - -
Still its giving error.
system
(system)
Closed
November 29, 2022, 1:57pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.