멈춘 ILM 단계 진단 및 재시도 (_ilm/explain, _ilm/retry)
Elasticsearch인덱스 수명 주기명령어
# Indices waiting in an error step:
GET log-*/_ilm/explain?only_errors=true
# Phase/action/step state and failure reason for one index:
GET log-000003/_ilm/explain?filter_path=indices.*.phase,indices.*.action,indices.*.step,indices.*.failed_step,indices.*.step_info,indices.*.is_auto_retryable_error
# After fixing the cause (example: missing rollover alias setting):
PUT log-000003/_settings
{
"index.lifecycle.rollover_alias": "log"
}
POST log-000003/_ilm/retry
# Is ILM running (if STOPPED, POST _ilm/start):
GET _ilm/status하는 일
ERROR 단계에서 대기 중인 인덱스, 멈춘 phase/action/step, 실패 사유(step_info)를 보여 주고, 원인을 해결한 후 실패한 단계를 다시 실행한다.
사용 시점
rollover가 일어나지 않을 때, 오래된 인덱스가 삭제되지 않을 때, 또는 ILM이 제거했어야 할 인덱스로 디스크가 찰 때.
주의
_ilm/retry는 ERROR 단계의 인덱스에서만 동작하며, 그렇지 않으면 'has not encountered an error'를 반환한다. 흔한 원인: rollover_alias 설정 누락 또는 alias의 is_write_index가 다른 인덱스에 있음, shrink를 위한 단일 노드 디스크 부족, allocation 규칙(_tier_preference)을 충족할 수 없음. 정책을 삭제해도 인덱스에서 ILM 관리가 제거되지 않으므로 먼저 인덱스에서 정책 설정을 제거한다.