Я использую Elasticsearch + Kibana + File-/Metric-/Winlogbeat для суммирования моих лог-файлов. Чтобы не забивать мой жесткий диск тоннами логов, я хотел просто хранить их 14 дней, поэтому я установил Curator, чтобы он сделал эту работу за меня. К сожалению, Curator не удаляет никакие логи из-заПустой список. Я не смог понять, почему Куратор считает, что нет подходящих индексов для удаления.
Мой 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
Ладно, для меня единственное рабочее решение — запустить curator_cli вручную, хотя это делается с помощью cronjob.
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-"}]'