Skip to content

Instantly share code, notes, and snippets.

@Nurlan199206
Last active December 26, 2023 05:38
Show Gist options
  • Save Nurlan199206/1719601feee071ed4147d19e5dfd9476 to your computer and use it in GitHub Desktop.
Save Nurlan199206/1719601feee071ed4147d19e5dfd9476 to your computer and use it in GitHub Desktop.
Curator with ElasticSearch config example
Пример использования curator для автоматического удаления индексов старше 4 дней.
Software versions:
curator: 5.8.1 (https://www.elastic.co/guide/en/elasticsearch/client/curator/current/yum-repository.html)
ElasticSearch: 7.5.0
1. curator --config /etc/elasticsearch/curator-clients.yml /etc/elasticsearch/curator-actions.yml - запуска куратора
0 2 * * * /usr/local/bin/curator --config /etc/elasticsearch/curator/client.yml /etc/elasticsearch/curator/action.yml
===================================curator-clients.yml=====================================
client:
hosts:
- 192.168.1.110
port: 9200
http_auth: elastic:mypassword
logging:
loglevel: INFO
logfile: /var/log/curator
logformat: default
===========================curator-actions.yml=========================
actions:
1:
action: delete_indices
description: >-
Delete indices older than 4 days (based on index name)
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: logstash-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment