- Curator Index Management:
- Curator and Index Lifecycle Management
- About
- Versions
- Installation
- Running Curator
- Configuration
- Actions
- Options
- allocation_type
- allow_ilm_indices
- continue_if_exception
- copy_aliases
- count
- delay
- delete_after
- delete_aliases
- skip_flush
- disable_action
- extra_settings
- ignore_empty_list
- ignore_unavailable
- include_aliases
- include_global_state
- indices
- key
- max_age
- max_docs
- max_size
- max_num_segments
- max_wait
- migration_prefix
- migration_suffix
- name
- new_index
- node_filters
- number_of_replicas
- number_of_shards
- partial
- post_allocation
- preserve_existing
- refresh
- remote_certificate
- remote_client_cert
- remote_client_key
- remote_filters
- remote_url_prefix
- rename_pattern
- rename_replacement
- repository
- requests_per_second
- request_body
- retry_count
- retry_interval
- routing_type
- search_pattern
- setting
- shrink_node
- shrink_prefix
- shrink_suffix
- slices
- skip_repo_fs_check
- timeout
- timeout_override
- value
- wait_for_active_shards
- wait_for_completion
- wait_for_rebalance
- wait_interval
- warn_if_no_indices
- Filters
- Filter Elements
- aliases
- allocation_type
- count
- date_from
- date_from_format
- date_to
- date_to_format
- direction
- disk_space
- epoch
- exclude
- field
- intersect
- key
- kind
- max_num_segments
- pattern
- period_type
- range_from
- range_to
- reverse
- source
- state
- stats_result
- timestring
- threshold_behavior
- unit
- unit_count
- unit_count_pattern
- use_age
- value
- week_starts_on
- Examples
- Frequently Asked Questions
timestring
edittimestring
editstrftime
editThis setting must be a valid Python strftime string. It is used to match and extract the timestamp in an index or snapshot name.
The identifiers that Curator currently recognizes include:
Unit | Value | Note |
---|---|---|
|
4 digit year |
|
|
4 digit year |
use instead of |
|
2 digit year |
|
|
2 digit month |
|
|
2 digit week of the year |
|
|
2 digit week of the year |
use instead of |
|
2 digit day of the month |
|
|
2 digit hour |
24 hour notation |
|
2 digit minute |
|
|
2 digit second |
|
|
3 digit day of the year |
These identifiers may be combined with each other, and/or separated from each
other with hyphens -
, periods .
, underscores _
, or other characters valid
in an index name.
Each identifier must be preceded by a %
character in the timestring. For
example, an index like index-2016.04.01
would use a timestring of
'%Y.%m.%d'
.
When source is name
, this setting must be set by the user or an
exception will be raised, and execution will halt. There is no default value.
A word about regular expression matching with timestrings
Timestrings are parsed from strftime patterns, like %Y.%m.%d
, into regular
expressions. For example, %Y
is 4 digits, so the regular expression for that
looks like \d{4}
, and %m
is 2 digits, so the regular expression is \d{2}
.
What this means is that a simple timestring to match year and month, %Y.%m
will result in a regular expression like this: ^.*\d{4}\.\d{2}.*$
. This
pattern will match any 4 digits, followed by a period .
, followed by 2 digits,
occurring anywhere in the index name. This means it will match monthly
indices, like index-2016.12
, as well as daily indices, like
index-2017.04.01
, which may not be the intended behavior.
To compensate for this, when selecting indices matching a subset of another
pattern, use a second filter with exclude
set to True
- filtertype: pattern kind: timestring value: '%Y.%m' - filtertype: pattern kind: timestring value: '%Y.%m.%d' exclude: True
This will prevent the %Y.%m
pattern from matching the %Y.%m
part of the
daily indices.
This applies whether using timestring
as a mere pattern match, or as part of
date calculations.
On this page
ElasticON events are back!
Learn about the Elastic Search AI Platform from the experts at our live events.
Register now