Last active
November 25, 2018 20:45
-
-
Save robertlyson/ecb7a53379d3e8f49d768090ad4fd1e8 to your computer and use it in GitHub Desktop.
Sample curator file to delete indices older than 45 days, based on https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex_delete_indices.html Curator installed from https://www.elastic.co/guide/en/elasticsearch/client/curator/current/windows-msi.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Remember, leave a key empty if there is no value. None will be a string, | |
# not a Python "NoneType" | |
# | |
# Also remember that all examples have 'disable_action' set to True. If you | |
# want to use this action as a template, be sure to set this to False after | |
# copying it. | |
actions: | |
1: | |
action: delete_indices | |
description: >- | |
Delete indices older than 45 days (based on index name), for logstash- | |
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 | |
disable_action: False | |
filters: | |
- filtertype: pattern | |
kind: prefix | |
value: myindex- | |
- filtertype: age | |
source: name | |
direction: older | |
timestring: '%Y.%m.%d' | |
unit: days | |
unit_count: 45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curator.exe --config config.yml action.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Remember, leave a key empty if there is no value. None will be a string, | |
# not a Python "NoneType" | |
client: | |
hosts: | |
- 127.0.0.1 | |
port: 9200 | |
url_prefix: | |
use_ssl: False | |
certificate: | |
client_cert: | |
client_key: | |
ssl_no_validate: False | |
http_auth: | |
timeout: 30 | |
master_only: False | |
logging: | |
loglevel: INFO | |
logfile: | |
logformat: default | |
blacklist: ['elasticsearch', 'urllib3'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment