Skip to content

Instantly share code, notes, and snippets.

@BrockReece
Created July 25, 2016 07:50
Show Gist options
  • Save BrockReece/be1128eeaad6c8ed59a21dffc522935a to your computer and use it in GitHub Desktop.
Save BrockReece/be1128eeaad6c8ed59a21dffc522935a to your computer and use it in GitHub Desktop.
Curator script for closing old indices
actions:
1:
action: close
description: >-
Close indices older than 2 days (based on index name), for logstash
and beat indices.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: closed
exclude: True
- filtertype: pattern
kind: prefix
value: (\%\{\[@metadata\]\[beat\]\}|logstash|filebeat|topbeat)-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 2
exclude:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment