1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
The different <<fe_kind,`kinds`>> are described as follows:
=== prefix
To match all indices starting with `logstash-`:
[source,yaml]
-------------
- filtertype: pattern
kind: prefix
value: logstash-
-------------
To match all indices _except_ those starting with `logstash-`:
[source,yaml]
-------------
- filtertype: pattern
kind: prefix
value: logstash-
exclude: True
-------------
NOTE: Internally, the `prefix` value is used to create a _regex_ pattern: `^{0}.*$`. Any special
characters should be escaped with a backslash to match literally.
=== suffix
To match all indices ending with `-prod`:
[source,yaml]
-------------
- filtertype: pattern
kind: suffix
value: -prod
-------------
To match all indices _except_ those ending with `-prod`:
[source,yaml]
-------------
- filtertype: pattern
kind: suffix
value: -prod
exclude: True
-------------
NOTE: Internally, the `suffix` value is used to create a _regex_ pattern: `^.*{0}$`. Any special
characters should be escaped with a backslash to match literally.
=== timestring
IMPORTANT: No age calculation takes place here. It is strictly a pattern match.
To match all indices with a Year.month.day pattern, like `index-2017.04.01`:
[source,yaml]
-------------
- filtertype: pattern
kind: timestring
value: '%Y.%m.%d'
-------------
To match all indices _except_ those with a Year.month.day pattern, like
`index-2017.04.01`:
[source,yaml]
-------------
- filtertype: pattern
kind: timestring
value: '%Y.%m.%d'
exclude: True
-------------
include::inc_timestring_regex.asciidoc[]
=== regex
This <<fe_kind,`kind`>> allows you to design a regular-expression to match
indices or snapshots:
To match all indices starting with `a-`, `b-`, or `c-`:
[source,yaml]
-------------
- filtertype: pattern
kind: regex
value: '^a-|^b-|^c-'
-------------
To match all indices _except_ those starting with `a-`, `b-`, or `c-`:
[source,yaml]
-------------
- filtertype: pattern
kind: regex
value: '^a-|^b-|^c-'
exclude: True
-------------
|