![Elasticsearch 큐레이터는 오래된 인덱스를 삭제하지 않습니다.](https://linux55.com/image/170301/Elasticsearch%20%ED%81%90%EB%A0%88%EC%9D%B4%ED%84%B0%EB%8A%94%20%EC%98%A4%EB%9E%98%EB%90%9C%20%EC%9D%B8%EB%8D%B1%EC%8A%A4%EB%A5%BC%20%EC%82%AD%EC%A0%9C%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
저는 Elasticsearch + Kibana + File-/Metric-/Winlogbeat를 사용하여 로그 파일을 요약합니다. 내 HDD를 수많은 로그로 채우지 않기 위해 14일 동안만 보관하고 싶었기 때문에 큐레이터를 설치하여 그 일을 대신해 주었습니다. 아쉽게도 큐레이터는 어떠한 로그도 삭제하지 않았습니다.빈 목록. 큐레이터가 삭제하기에 적합한 색인이 없다고 생각하는 이유를 알 수 없습니다.
내 action.yml은 다음과 같습니다
actions:
1:
action: delete_indices
description: >-
Delete indices older than 30 days (based on index name), for winlogbeat-
prefixed indices. Ignore the error if the filter does not result in an
actionable list of indices (ignore_empty_list) and exit cleanly.
options:
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: winlogbeat-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 14
내 Winlog 인덱스의 이름은 다음과 같습니다.
winlogbeat-7.5.2-2020.04.01-000033
winlogbeat-7.5.2-2020.04.02-000034
여러 가지 방법을 시도했지만 문제는 여전히 지속됩니다.
내 문제를 어떻게 해결할 수 있을지 아시나요?
답변1
글쎄요, 제가 유일하게 작동하는 솔루션은 cronjob에 의해 수행되었지만 curator_cli를 수동으로 실행하는 것이었습니다.
curator_cli --config /home/user/curator.yml delete_indices --filter_list '[{"filtertype":"age","source":"creation_date","direction":"older","timestring":"%Y.%m.%d","unit":"days","unit_count":7},{"filtertype":"pattern","kind":"prefix","value":"winlogbeat-"}]'