Instance variable. All indices in the cluster at instance creation time. Type: list()
An Elasticsearch Client object Also accessible as an instance variable.
Raise exception if indices is empty
Match indices that have the routing allocation rule of key=value from indices
Parameters: |
|
---|
Match indices by relative age calculations.
Parameters: |
|
---|
Match indices which are associated with the alias or list of aliases identified by aliases.
An update to Elasticsearch 5.5.0 changes the behavior of this from previous 5.x versions: https://www.elastic.co/guide/en/elasticsearch/reference/5.5/breaking-changes-5.5.html#breaking_55_rest_changes
What this means is that indices must appear in all aliases in list aliases or a 404 error will result, leading to no indices being matched. In older versions, if the index was associated with even one of the aliases in aliases, it would result in a match.
It is unknown if this behavior affects anyone. At the time this was written, no users have been bit by this. The code could be adapted to manually loop if the previous behavior is desired. But if no users complain, this will become the accepted/expected behavior.
Parameters: |
|
---|
Remove indices from the actionable list beyond the number count, sorted reverse-alphabetically by default. If you set reverse to False, it will be sorted alphabetically.
The default is usually what you will want. If only one kind of index is provided–for example, indices matching logstash-%Y.%m.%d–then reverse alphabetical sorting will mean the oldest will remain in the list, because lower numbers in the dates mean older indices.
By setting reverse to False, then index3 will be deleted before index2, which will be deleted before index1
use_age allows ordering indices by age. Age is determined by the index creation date by default, but you can specify an source of name, max_value, or min_value. The name source requires the timestring argument.
Parameters: |
|
---|
Match indices by regular expression (pattern).
Parameters: |
|
---|
Remove indices from the actionable list based on space consumed, sorted reverse-alphabetically by default. If you set reverse to False, it will be sorted alphabetically.
The default is usually what you will want. If only one kind of index is provided–for example, indices matching logstash-%Y.%m.%d–then reverse alphabetical sorting will mean the oldest will remain in the list, because lower numbers in the dates mean older indices.
By setting reverse to False, then index3 will be deleted before index2, which will be deleted before index1
use_age allows ordering indices by age. Age is determined by the index creation date by default, but you can specify an source of name, max_value, or min_value. The name source requires the timestring argument.
Parameters: |
|
---|
Filter out closed indices from indices
Parameters: | exclude – If exclude is True, this filter will remove matching indices from indices. If exclude is False, then only matching indices will be kept in indices. Default is True |
---|
Match any index which has max_num_segments per shard or fewer in the actionable list.
Parameters: |
|
---|
Match any index named .kibana, kibana-int, .marvel-kibana, or .marvel-es-data in indices.
Parameters: | exclude – If exclude is True, this filter will remove matching indices from indices. If exclude is False, then only matching indices will be kept in indices. Default is True |
---|
Filter out opened indices from indices
Parameters: | exclude – If exclude is True, this filter will remove matching indices from indices. If exclude is False, then only matching indices will be kept in indices. Default is True |
---|
Match indices within ages within a given period.
Parameters: |
|
---|
Instance variable. Information extracted from indices, such as segment count, age, etc. Populated at instance creation time, and by other private helper methods, as needed. Type: dict()
Instance variable. The running list of indices which will be used by an Action class. Populated at instance creation time. Type: list()
Iterate over the filters defined in config and execute them.
Parameters: | filter_dict – The configuration dictionary |
---|
Note
filter_dict should be a dictionary with the following form:
{ 'filters' : [
{
'filtertype': 'the_filter_type',
'key1' : 'value1',
...
'keyN' : 'valueN'
}
]
}
Return the current value of indices as copy-by-value to prevent list stomping during iterations
An Elasticsearch Client object. Also accessible as an instance variable.
Raise exception if snapshots is empty
Remove snapshots from snapshots by relative age calculations.
Parameters: |
|
---|
Remove snapshots from the actionable list beyond the number count, sorted reverse-alphabetically by default. If you set reverse to False, it will be sorted alphabetically.
The default is usually what you will want. If only one kind of snapshot is provided–for example, snapshots matching curator-%Y%m%d%H%M%S– then reverse alphabetical sorting will mean the oldest will remain in the list, because lower numbers in the dates mean older snapshots.
By setting reverse to False, then snapshot3 will be acted on before snapshot2, which will be acted on before snapshot1
use_age allows ordering snapshots by age. Age is determined by the snapshot creation date (as identified by start_time_in_millis) by default, but you can also specify a source of name. The name source requires the timestring argument.
Parameters: |
|
---|
Filter out snapshots not matching the pattern, or in the case of exclude, filter those matching the pattern.
Parameters: |
|
---|
Filter out snapshots not matching state, or in the case of exclude, filter those matching state.
Parameters: |
|
---|
Match indices within ages within a given period.
Parameters: |
|
---|
Iterate over the filters defined in config and execute them.
Parameters: | config – A dictionary of filters, as extracted from the YAML configuration file. |
---|
Note
config should be a dictionary with the following form:
{ 'filters' : [
{
'filtertype': 'the_filter_type',
'key1' : 'value1',
...
'keyN' : 'valueN'
}
]
}
Return the most recent snapshot based on start_time_in_millis.
An Elasticsearch repository. Also accessible as an instance variable.
Instance variable. Information extracted from snapshots, such as age, etc. Populated by internal method __get_snapshots at instance creation time. Type: dict()
Instance variable. The running list of snapshots which will be used by an Action class. Populated by internal methods __get_snapshots at instance creation time. Type: list()
Return the current value of snapshots as copy-by-value to prevent list stomping during iterations