Elasticsearch Curator Python API

The Elasticsearch Curator Python API helps you manage your indices and snapshots.

Note

This documentation is for the Elasticsearch Curator Python API. Documentation for the Elasticsearch Curator CLI – which uses this API and is installed as an entry_point as part of the package – is available in the Elastic guide.

Compatibility

The Elasticsearch Curator Python API is compatible with the 5.x Elasticsearch versions, and supports Python versions 2.7 and later.

Example Usage

import elasticsearch
import curator

client = elasticsearch.Elasticsearch()

ilo = curator.IndexList(client)
ilo.filter_by_regex(kind='prefix', value='logstash-')
ilo.filter_by_age(source='name', direction='older', timestring='%Y.%m.%d', unit='days', unit_count=30)
delete_indices = curator.DeleteIndices(ilo)
delete_indices.do_action()

Tip

See more examples in the Examples page.

Features

The API methods fall into the following categories:

Logging

The Elasticsearch Curator Python API uses the standard logging library from Python. It inherits two loggers from elasticsearch-py: elasticsearch and elasticsearch.trace. Clients use the elasticsearch logger to log standard activity, depending on the log level. The elasticsearch.trace logger logs requests to the server in JSON format as pretty-printed curl commands that you can execute from the command line. The elasticsearch.trace logger is not inherited from the base logger and must be activated separately.

Contents

Object Classes

IndexList

class curator.indexlist.IndexList(client)
all_indices = None

Instance variable. All indices in the cluster at instance creation time. Type: list()

client = None

An Elasticsearch Client object Also accessible as an instance variable.

empty_list_check()

Raise exception if indices is empty

filter_allocated(key=None, value=None, allocation_type='require', exclude=True)

Match indices that have the routing allocation rule of key=value from indices

Parameters:
  • key – The allocation attribute to check for
  • value – The value to check for
  • allocation_type – Type of allocation to apply
  • 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_by_age(source='name', direction=None, timestring=None, unit=None, unit_count=None, field=None, stats_result='min_value', epoch=None, exclude=False, unit_count_pattern=False)

Match indices by relative age calculations.

Parameters:
  • source – Source of index age. Can be one of ‘name’, ‘creation_date’, or ‘field_stats’
  • direction – Time to filter, either older or younger
  • timestring – An strftime string to match the datestamp in an index name. Only used for index filtering by name.
  • unit – One of seconds, minutes, hours, days, weeks, months, or years.
  • unit_count – The number of unit (s). unit_count * unit will be calculated out to the relative number of seconds.
  • unit_count_pattern – A regular expression whose capture group identifies the value for unit_count.
  • field – A timestamp field name. Only used for field_stats based calculations.
  • stats_result – Either min_value or max_value. Only used in conjunction with source`=``field_stats` to choose whether to reference the minimum or maximum result value.
  • epoch – An epoch timestamp used in conjunction with unit and unit_count to establish a point of reference for calculations. If not provided, the current time will be used.
  • 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 False
filter_by_alias(aliases=None, exclude=False)

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:
  • aliases (list) – A list of alias names.
  • 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 False
filter_by_count(count=None, reverse=True, use_age=False, pattern=None, source='creation_date', timestring=None, field=None, stats_result='min_value', exclude=True)

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:
  • count – Filter indices beyond count.
  • reverse – The filtering direction. (default: True).
  • use_age – Sort indices by age. source is required in this case.
  • pattern – Select indices to count from a regular expression pattern. This pattern must have one and only one capture group. This can allow a single count filter instance to operate against any number of matching patterns, and keep count of each index in that group. For example, given a pattern of '^(.*)-\d{6}$', it will match both rollover-000001 and index-999990, but not logstash-2017.10.12. Following the same example, if my cluster also had rollover-000002 through rollover-000010 and index-888888 through index-999999, it will process both groups of indices, and include or exclude the count of each.
  • source – Source of index age. Can be one of name, creation_date, or field_stats. Default: creation_date
  • timestring – An strftime string to match the datestamp in an index name. Only used if source name is selected.
  • field – A timestamp field name. Only used if source field_stats is selected.
  • stats_result – Either min_value or max_value. Only used if source field_stats is selected. It determines whether to reference the minimum or maximum value of field in each index.
  • 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_by_regex(kind=None, value=None, exclude=False)

Match indices by regular expression (pattern).

Parameters:
  • kind – Can be one of: suffix, prefix, regex, or timestring. This option defines what kind of filter you will be building.
  • value – Depends on kind. It is the strftime string if kind is timestring. It’s used to build the regular expression for other kinds.
  • 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 False
filter_by_space(disk_space=None, reverse=True, use_age=False, source='creation_date', timestring=None, field=None, stats_result='min_value', exclude=False, threshold_behavior='greater_than')

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.

threshold_behavior, when set to greater_than (default), includes if it the index tests to be larger than disk_space. When set to less_than, it includes if the index is smaller than disk_space

Parameters:
  • disk_space – Filter indices over n gigabytes
  • threshold_behavior – Size to filter, either greater_than or less_than. Defaults to greater_than to preserve backwards compatability.
  • reverse – The filtering direction. (default: True). Ignored if use_age is True
  • use_age – Sort indices by age. source is required in this case.
  • source – Source of index age. Can be one of name, creation_date, or field_stats. Default: creation_date
  • timestring – An strftime string to match the datestamp in an index name. Only used if source name is selected.
  • field – A timestamp field name. Only used if source field_stats is selected.
  • stats_result – Either min_value or max_value. Only used if source field_stats is selected. It determines whether to reference the minimum or maximum value of field in each index.
  • 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 False
filter_closed(exclude=True)

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
filter_forceMerged(max_num_segments=None, exclude=True)

Match any index which has max_num_segments per shard or fewer in the actionable list.

Parameters:
  • max_num_segments – Cutoff number of segments per shard.
  • 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_kibana(exclude=True)

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_opened(exclude=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
filter_period(period_type='relative', source='name', range_from=None, range_to=None, date_from=None, date_to=None, date_from_format=None, date_to_format=None, timestring=None, unit=None, field=None, stats_result='min_value', intersect=False, week_starts_on='sunday', epoch=None, exclude=False)

Match indices within ages within a given period.

Parameters:
  • period_type – Can be either absolute or relative. Default is relative. date_from and date_to are required when using period_type='absolute'`. ``range_from and range_to are required with ``period_type=’relative’`.
  • source – Source of index age. Can be one of ‘name’, ‘creation_date’, or ‘field_stats’
  • range_from – How many unit (s) in the past/future is the origin?
  • range_to – How many unit (s) in the past/future is the end point?
  • date_from – The simplified date for the start of the range
  • date_to – The simplified date for the end of the range. If this value is the same as date_from, the full value of unit will be extrapolated for the range. For example, if unit is months, and date_from and date_to are both 2017.01, then the entire month of January 2017 will be the absolute date range.
  • date_from_format – The strftime string used to parse date_from
  • date_to_format – The strftime string used to parse date_to
  • timestring – An strftime string to match the datestamp in an index name. Only used for index filtering by name.
  • unit – One of hours, days, weeks, months, or years.
  • unit_count – The number of unit (s). unit_count * unit will be calculated out to the relative number of seconds.
  • field – A timestamp field name. Only used for field_stats based calculations.
  • stats_result – Either min_value or max_value. Only used in conjunction with source``=``field_stats to choose whether to reference the minimum or maximum result value.
  • intersect – Only used when source``=``field_stats. If True, only indices where both min_value and max_value are within the period will be selected. If False, it will use whichever you specified. Default is False to preserve expected behavior.
  • week_starts_on – Either sunday or monday. Default is sunday
  • epoch – An epoch timestamp used to establish a point of reference for calculations. If not provided, the current time will be used.
  • 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 False
index_info = None

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()

indices = None

Instance variable. The running list of indices which will be used by an Action class. Populated at instance creation time. Type: list()

iterate_filters(filter_dict)

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'
        }
    ]
}
working_list()

Return the current value of indices as copy-by-value to prevent list stomping during iterations

SnapshotList

class curator.snapshotlist.SnapshotList(client, repository=None)
client = None

An Elasticsearch Client object. Also accessible as an instance variable.

empty_list_check()

Raise exception if snapshots is empty

filter_by_age(source='creation_date', direction=None, timestring=None, unit=None, unit_count=None, epoch=None, exclude=False)

Remove snapshots from snapshots by relative age calculations.

Parameters:
  • source – Source of snapshot age. Can be ‘name’, or ‘creation_date’.
  • direction – Time to filter, either older or younger
  • timestring – An strftime string to match the datestamp in an snapshot name. Only used for snapshot filtering by name.
  • unit – One of seconds, minutes, hours, days, weeks, months, or years.
  • unit_count – The number of unit (s). unit_count * unit will be calculated out to the relative number of seconds.
  • epoch – An epoch timestamp used in conjunction with unit and unit_count to establish a point of reference for calculations. If not provided, the current time will be used.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is False
filter_by_count(count=None, reverse=True, use_age=False, source='creation_date', timestring=None, exclude=True)

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:
  • count – Filter snapshots beyond count.
  • reverse – The filtering direction. (default: True).
  • use_age – Sort snapshots by age. source is required in this case.
  • source – Source of snapshot age. Can be one of name, or creation_date. Default: creation_date
  • timestring – An strftime string to match the datestamp in a snapshot name. Only used if source name is selected.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is True
filter_by_regex(kind=None, value=None, exclude=False)

Filter out snapshots not matching the pattern, or in the case of exclude, filter those matching the pattern.

Parameters:
  • kind – Can be one of: suffix, prefix, regex, or timestring. This option defines what kind of filter you will be building.
  • value – Depends on kind. It is the strftime string if kind is timestring. It’s used to build the regular expression for other kinds.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is False
filter_by_state(state=None, exclude=False)

Filter out snapshots not matching state, or in the case of exclude, filter those matching state.

Parameters:
  • state – The snapshot state to filter for. Must be one of SUCCESS, PARTIAL, FAILED, or IN_PROGRESS.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is False
filter_period(source='name', range_from=None, range_to=None, timestring=None, unit=None, field=None, stats_result='min_value', week_starts_on='sunday', epoch=None, exclude=False)

Match indices within ages within a given period.

Parameters:
  • source – Source of snapshot age. Can be ‘name’, or ‘creation_date’.
  • range_from – How many unit (s) in the past/future is the origin?
  • range_to – How many unit (s) in the past/future is the end point?
  • timestring – An strftime string to match the datestamp in an snapshot name. Only used for snapshot filtering by name.
  • unit – One of hours, days, weeks, months, or years.
  • week_starts_on – Either sunday or monday. Default is sunday
  • epoch – An epoch timestamp used to establish a point of reference for calculations. If not provided, the current time will be used.
  • 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 False
iterate_filters(config)

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'
        }
    ]
}
most_recent()

Return the most recent snapshot based on start_time_in_millis.

repository = None

An Elasticsearch repository. Also accessible as an instance variable.

snapshot_info = None

Instance variable. Information extracted from snapshots, such as age, etc. Populated by internal method __get_snapshots at instance creation time. Type: dict()

snapshots = None

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()

working_list()

Return the current value of snapshots as copy-by-value to prevent list stomping during iterations

Action Classes

See also

It is important to note that each action has a do_action() method, which accepts no arguments. This is the means by which all actions are executed.

Alias

class curator.actions.Alias(name=None, extra_settings={}, **kwargs)

Define the Alias object.

Parameters:
actions = None

The list of actions to perform. Populated by curator.actions.Alias.add and curator.actions.Alias.remove

add(ilo, warn_if_no_indices=False)

Create add statements for each index in ilo for alias, then append them to actions. Add any extras that may be there.

Parameters:ilo – A curator.indexlist.IndexList object
body()

Return a body string suitable for use with the update_aliases API call.

client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_action()

Run the API call update_aliases with the results of body()

do_dry_run()

Log what the output would be, but take no action.

extra_settings = None

Instance variable. Any extra things to add to the alias, like filters, or routing.

name = None

Instance variable The strftime parsed version of name.

remove(ilo, warn_if_no_indices=False)

Create remove statements for each index in ilo for alias, then append them to actions.

Parameters:ilo – A curator.indexlist.IndexList object

Allocation

class curator.actions.Allocation(ilo, key=None, value=None, allocation_type='require', wait_for_completion=False, wait_interval=3, max_wait=-1)
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • key – An arbitrary metadata attribute key. Must match the key assigned to at least some of your nodes to have any effect.
  • value – An arbitrary metadata attribute value. Must correspond to values associated with key assigned to at least some of your nodes to have any effect. If a None value is provided, it will remove any setting associated with that key.
  • allocation_type – Type of allocation to apply. Default is require
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. (default: False)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
bkey = None

Instance variable. Populated at instance creation time. Value is index.routing.allocation. allocation_type . key . value

client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_action()

Change allocation settings for indices in index_list.indices with the settings in body.

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

wait_interval = None

Instance variable How many seconds to wait between checks for completion.

wfc = None

Instance variable. Internal reference to wait_for_completion

Close

class curator.actions.Close(ilo, delete_aliases=False)
Parameters:
client = None

Instance variable. The Elasticsearch Client object derived from ilo

delete_aliases = None

Instance variable. Internal reference to delete_aliases

do_action()

Close open indices in index_list.indices

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

ClusterRouting

class curator.actions.ClusterRouting(client, routing_type=None, setting=None, value=None, wait_for_completion=False, wait_interval=9, max_wait=-1)

For now, the cluster routing settings are hardcoded to be transient

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • routing_type – Type of routing to apply. Either allocation or rebalance
  • setting – Currently, the only acceptable value for setting is enable. This is here in case that changes.
  • value – Used only if setting is enable. Semi-dependent on routing_type. Acceptable values for allocation and rebalance are all, primaries, and none (string, not NoneType). If routing_type is allocation, this can also be new_primaries, and if rebalance, it can be replicas.
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. (default: False)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
client = None

Instance variable. An elasticsearch.Elasticsearch client object

do_action()

Change cluster routing settings with the settings in body.

do_dry_run()

Log what the output would be, but take no action.

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

wait_interval = None

Instance variable How many seconds to wait between checks for completion.

wfc = None

Instance variable. Internal reference to wait_for_completion

CreateIndex

class curator.actions.CreateIndex(client, name, extra_settings={})
Parameters:
body = None

Instance variable. Extracted from the config yaml, it should be a dictionary of mappings and settings suitable for index creation.

client = None

Instance variable. An elasticsearch.Elasticsearch client object

do_action()

Create index identified by name with settings in body

do_dry_run()

Log what the output would be, but take no action.

name = None

Instance variable. The parsed version of name

DeleteIndices

class curator.actions.DeleteIndices(ilo, master_timeout=30)
Parameters:
client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_action()

Delete indices in index_list.indices

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

master_timeout = None

Instance variable. String value of master_timeout + ‘s’, for seconds.

DeleteSnapshots

class curator.actions.DeleteSnapshots(slo, retry_interval=120, retry_count=3)
Parameters:
  • slo – A curator.snapshotlist.SnapshotList object
  • retry_interval – Number of seconds to delay betwen retries. Default: 120 (seconds)
  • retry_count – Number of attempts to make. Default: 3
client = None

Instance variable. The Elasticsearch Client object derived from slo

do_action()

Delete snapshots in slo Retry up to retry_count times, pausing retry_interval seconds between retries.

do_dry_run()

Log what the output would be, but take no action.

repository = None

Instance variable. The repository name derived from slo

retry_count = None

Instance variable. Internally accessible copy of retry_count

retry_interval = None

Instance variable. Internally accessible copy of retry_interval

snapshot_list = None

Instance variable. Internal reference to slo

ForceMerge

class curator.actions.ForceMerge(ilo, max_num_segments=None, delay=0)
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • max_num_segments – Number of segments per shard to forceMerge
  • delay – Number of seconds to delay between forceMerge operations
client = None

Instance variable. The Elasticsearch Client object derived from ilo

delay = None

Instance variable. Internally accessible copy of delay

do_action()

forcemerge indices in index_list.indices

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

max_num_segments = None

Instance variable. Internally accessible copy of max_num_segments

IndexSettings

class curator.actions.IndexSettings(ilo, index_settings={}, ignore_unavailable=False, preserve_existing=False)
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • index_settings – A dictionary structure with one or more index settings to change.
  • ignore_unavailable – Whether specified concrete indices should be ignored when unavailable (missing or closed)
  • preserve_existing – Whether to update existing settings. If set to True existing settings on an index remain unchanged. The default is False
body = None

Instance variable. Internal reference to index_settings

client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_dry_run()

Log what the output would be, but take no action.

ignore_unavailable = None

Instance variable. Internal reference to ignore_unavailable

index_list = None

Instance variable. Internal reference to ilo

preserve_existing = None

Instance variable. Internal reference to preserve_settings

Open

class curator.actions.Open(ilo)
Parameters:ilo – A curator.indexlist.IndexList object
client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_action()

Open closed indices in index_list.indices

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

Reindex

class curator.actions.Reindex(ilo, request_body, refresh=True, requests_per_second=-1, slices=1, timeout=60, wait_for_active_shards=1, wait_for_completion=True, max_wait=-1, wait_interval=9, remote_url_prefix=None, remote_ssl_no_validate=None, remote_certificate=None, remote_client_cert=None, remote_client_key=None, remote_aws_key=None, remote_aws_secret_key=None, remote_aws_region=None, remote_filters={}, migration_prefix='', migration_suffix='')
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • request_body – The body to send to elasticsearch.Elasticsearch.reindex(), which must be complete and usable, as Curator will do no vetting of the request_body. If it fails to function, Curator will return an exception.
  • refresh (bool) – Whether to refresh the entire target index after the operation is complete. (default: True)
  • requests_per_second – The throttle to set on this request in sub-requests per second. -1 means set no throttle as does unlimited which is the only non-float this accepts. (default: -1)
  • slices – The number of slices this task should be divided into. 1 means the task will not be sliced into subtasks. (default: 1)
  • timeout – The length in seconds each individual bulk request should wait for shards that are unavailable. (default: 60)
  • wait_for_active_shards – Sets the number of shard copies that must be active before proceeding with the reindex operation. (default: 1) means the primary shard only. Set to all for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. (default: True)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
  • remote_url_prefix (str) – Optional url prefix, if needed to reach the Elasticsearch API (i.e., it’s not at the root level)
  • remote_ssl_no_validate (bool) – If True, do not validate the certificate chain. This is an insecure option and you will see warnings in the log output.
  • remote_certificate – Path to SSL/TLS certificate
  • remote_client_cert – Path to SSL/TLS client certificate (public key)
  • remote_client_key – Path to SSL/TLS private key
  • remote_aws_key – AWS IAM Access Key (Only used if the requests-aws4auth python module is installed)
  • remote_aws_secret_key – AWS IAM Secret Access Key (Only used if the requests-aws4auth python module is installed)
  • remote_aws_region – AWS Region (Only used if the requests-aws4auth python module is installed)
  • remote_filters – Apply these filters to the remote client for remote index selection.
  • migration_prefix – When migrating, prepend this value to the index name.
  • migration_suffix – When migrating, append this value to the index name.
body = None

Instance variable. Internal reference to request_body

client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_action()

Execute elasticsearch.Elasticsearch.reindex() operation with the provided request_body and arguments.

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

mpfx = None

Instance variable. Internal reference to migration_prefix

msfx = None

Instance variable. Internal reference to migration_suffix

refresh = None

Instance variable. Internal reference to refresh

requests_per_second = None

Instance variable. Internal reference to requests_per_second

show_run_args(source, dest)

Show what will run

slices = None

Instance variable. Internal reference to slices

timeout = None

Instance variable. Internal reference to timeout, and add “s” for seconds.

wait_for_active_shards = None

Instance variable. Internal reference to wait_for_active_shards

wait_interval = None

Instance variable How many seconds to wait between checks for completion.

wfc = None

Instance variable. Internal reference to wait_for_completion

Replicas

class curator.actions.Replicas(ilo, count=None, wait_for_completion=False, wait_interval=9, max_wait=-1)
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • count – The count of replicas per shard
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. (default: False)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
client = None

Instance variable. The Elasticsearch Client object derived from ilo

count = None

Instance variable. Internally accessible copy of count

do_action()

Update the replica count of indices in index_list.indices

do_dry_run()

Log what the output would be, but take no action.

index_list = None

Instance variable. Internal reference to ilo

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

wait_interval = None

Instance variable How many seconds to wait between checks for completion.

wfc = None

Instance variable. Internal reference to wait_for_completion

Restore

class curator.actions.Restore(slo, name=None, indices=None, include_aliases=False, ignore_unavailable=False, include_global_state=False, partial=False, rename_pattern=None, rename_replacement=None, extra_settings={}, wait_for_completion=True, wait_interval=9, max_wait=-1, skip_repo_fs_check=False)
Parameters:
  • slo – A curator.snapshotlist.SnapshotList object
  • name (str) – Name of the snapshot to restore. If no name is provided, it will restore the most recent snapshot by age.
  • indices (list) – A list of indices to restore. If no indices are provided, it will restore all indices in the snapshot.
  • include_aliases (bool) – If set to True, restore aliases with the indices. (default: False)
  • ignore_unavailable (bool) – Ignore unavailable shards/indices. (default: False)
  • include_global_state (bool) – Restore cluster global state with snapshot. (default: False)
  • partial (bool) – Do not fail if primary shard is unavailable. (default: False)
  • rename_pattern (str) – A regular expression pattern with one or more captures, e.g. index_(.+)
  • rename_replacement (str) – A target index name pattern with $# numbered references to the captures in rename_pattern, e.g. restored_index_$1
  • extra_settings (dict, representing the settings.) – Extra settings, including shard count and settings to omit. For more information see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html#_changing_index_settings_during_restore
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. (default: True)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
  • skip_repo_fs_check (bool) – Do not validate write access to repository on all cluster nodes before proceeding. (default: False). Useful for shared filesystems where intermittent timeouts can affect validation, but won’t likely affect snapshot success.
body = None

Instance variable. Populated at instance creation time from the other options

client = None

Instance variable. The Elasticsearch Client object derived from slo

do_action()

Restore indices with options passed.

do_dry_run()

Log what the output would be, but take no action.

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

name = None

Instance variable. Will use a provided snapshot name, or the most recent snapshot in slo

py_rename_replacement = None

Also an instance variable version of rename_replacement but with Java regex group designations of $# converted to Python’s \\# style.

rename_pattern = None

Instance variable version of rename_pattern

rename_replacement = None

Instance variable version of rename_replacement

report_state()

Log the state of the restore This should only be done if wait_for_completion is True, and only after completing the restore.

repository = None

Instance variable. repository derived from slo

skip_repo_fs_check = None

Instance variable. Internally accessible copy of skip_repo_fs_check

snapshot_list = None

Instance variable. Internal reference to slo

wait_interval = None

Instance variable How many seconds to wait between checks for completion.

Rollover

class curator.actions.Rollover(client, name, conditions, new_index=None, extra_settings=None, wait_for_active_shards=1)
Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • name – The name of the single-index-mapped alias to test for rollover conditions.
  • conditions – A dictionary of conditions to test
  • extra_settings – Must be either None, or a dictionary of settings to apply to the new index on rollover. This is used in place of settings in the Rollover API, mostly because it’s already existent in other places here in Curator
  • wait_for_active_shards – The number of shards expected to be active before returning.
New_index:

The new index name

body()

Create a body from conditions and settings

client = None

Instance variable. The Elasticsearch Client object

conditions = None

Instance variable. Internal reference to conditions

do_action()

Rollover the index referenced by alias name

do_dry_run()

Log what the output would be, but take no action.

doit(dry_run=False)

This exists solely to prevent having to have duplicate code in both do_dry_run and do_action

new_index = None

Instance variable. Internal reference to new_index

settings = None

Instance variable. Internal reference to extra_settings

wait_for_active_shards = None

Instance variable. Internal reference to wait_for_active_shards

Shrink

class curator.actions.Shrink(ilo, shrink_node='DETERMINISTIC', node_filters={}, number_of_shards=1, number_of_replicas=1, shrink_prefix='', shrink_suffix='-shrink', copy_aliases=False, delete_after=True, post_allocation={}, wait_for_active_shards=1, extra_settings={}, wait_for_completion=True, wait_interval=9, max_wait=-1)
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • shrink_node – The node name to use as the shrink target, or DETERMINISTIC, which will use the values in node_filters to determine which node will be the shrink node.
  • node_filters (dict, representing the filters) – If the value of shrink_node is DETERMINISTIC, the values in node_filters will be used while determining which node to allocate the shards on before performing the shrink.
  • number_of_shards – The number of shards the shrunk index should have
  • number_of_replicas – The number of replicas for the shrunk index
  • shrink_prefix – Prepend the shrunk index with this value
  • shrink_suffix – Append the value to the shrunk index (default: -shrink)
  • copy_aliases (bool) – Whether to copy each source index aliases to target index after shrinking. the aliases will be added to target index and deleted from source index at the same time(default: False)
  • delete_after (bool) – Whether to delete each index after shrinking. (default: True)
  • post_allocation (dict, with keys allocation_type, key, and value) – If populated, the allocation_type, key, and value will be applied to the shrunk index to re-route it.
  • wait_for_active_shards – The number of shards expected to be active before returning.
  • extra_settings (dict) – Permitted root keys are settings and aliases. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html
  • wait_for_active_shards – Wait for active shards before returning.
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. You should not normally change this, ever. (default: True)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
client = None

Instance variable. The Elasticsearch Client object derived from ilo

copy_aliases = None

Instance variable. Internal reference to copy_aliases

delete_after = None

Instance variable. Internal reference to delete_after

do_dry_run()

Show what a regular run would do, but don’t actually do it.

index_list = None

Instance variable. Internal reference to ilo

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

most_available_node()

Determine which data node name has the most available free space, and meets the other node filters settings.

Parameters:client – An elasticsearch.Elasticsearch client object
node_filters = None

Instance variable. Internal reference to node_filters

number_of_shards = None

Instance variable. Internal reference to number_of_shards

post_allocation = None

Instance variable. Internal reference to post_allocation

shrink_node = None

Instance variable. Internal reference to shrink_node

shrink_prefix = None

Instance variable. Internal reference to shrink_prefix

shrink_suffix = None

Instance variable. Internal reference to shrink_suffix

wait_interval = None

Instance variable. How many seconds to wait between checks for completion.

wfc = None

Instance variable. Internal reference to wait_for_completion

Snapshot

class curator.actions.Snapshot(ilo, repository=None, name=None, ignore_unavailable=False, include_global_state=True, partial=False, wait_for_completion=True, wait_interval=9, max_wait=-1, skip_repo_fs_check=False)
Parameters:
  • ilo – A curator.indexlist.IndexList object
  • repository – The Elasticsearch snapshot repository to use
  • name – What to name the snapshot.
  • wait_for_completion (bool) – Wait (or not) for the operation to complete before returning. (default: True)
  • wait_interval – How long in seconds to wait between checks for completion.
  • max_wait – Maximum number of seconds to wait_for_completion
  • ignore_unavailable (bool) – Ignore unavailable shards/indices. (default: False)
  • include_global_state (bool) – Store cluster global state with snapshot. (default: True)
  • partial (bool) – Do not fail if primary shard is unavailable. (default: False)
  • skip_repo_fs_check (bool) – Do not validate write access to repository on all cluster nodes before proceeding. (default: False). Useful for shared filesystems where intermittent timeouts can affect validation, but won’t likely affect snapshot success.
body = None

Instance variable. Populated at instance creation time by calling curator.utils.create_snapshot_body with ilo.indices and the provided arguments: ignore_unavailable, include_global_state, partial

client = None

Instance variable. The Elasticsearch Client object derived from ilo

do_action()

Snapshot indices in index_list.indices, with options passed.

do_dry_run()

Log what the output would be, but take no action.

get_state()

Get the state of the snapshot

index_list = None

Instance variable. Internal reference to ilo

max_wait = None

Instance variable. How long in seconds to wait_for_completion before returning with an exception. A value of -1 means wait forever.

name = None

Instance variable. The parsed version of name

report_state()

Log the state of the snapshot

repository = None

Instance variable. Internally accessible copy of repository

skip_repo_fs_check = None

Instance variable. Internally accessible copy of skip_repo_fs_check

wait_for_completion = None

Instance variable. Internally accessible copy of wait_for_completion

wait_interval = None

Instance variable How many seconds to wait between checks for completion.

Filter Methods

IndexList

IndexList.filter_allocated(key=None, value=None, allocation_type='require', exclude=True)

Match indices that have the routing allocation rule of key=value from indices

Parameters:
  • key – The allocation attribute to check for
  • value – The value to check for
  • allocation_type – Type of allocation to apply
  • 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
IndexList.filter_by_age(source='name', direction=None, timestring=None, unit=None, unit_count=None, field=None, stats_result='min_value', epoch=None, exclude=False, unit_count_pattern=False)

Match indices by relative age calculations.

Parameters:
  • source – Source of index age. Can be one of ‘name’, ‘creation_date’, or ‘field_stats’
  • direction – Time to filter, either older or younger
  • timestring – An strftime string to match the datestamp in an index name. Only used for index filtering by name.
  • unit – One of seconds, minutes, hours, days, weeks, months, or years.
  • unit_count – The number of unit (s). unit_count * unit will be calculated out to the relative number of seconds.
  • unit_count_pattern – A regular expression whose capture group identifies the value for unit_count.
  • field – A timestamp field name. Only used for field_stats based calculations.
  • stats_result – Either min_value or max_value. Only used in conjunction with source`=``field_stats` to choose whether to reference the minimum or maximum result value.
  • epoch – An epoch timestamp used in conjunction with unit and unit_count to establish a point of reference for calculations. If not provided, the current time will be used.
  • 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 False
IndexList.filter_by_regex(kind=None, value=None, exclude=False)

Match indices by regular expression (pattern).

Parameters:
  • kind – Can be one of: suffix, prefix, regex, or timestring. This option defines what kind of filter you will be building.
  • value – Depends on kind. It is the strftime string if kind is timestring. It’s used to build the regular expression for other kinds.
  • 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 False
IndexList.filter_by_space(disk_space=None, reverse=True, use_age=False, source='creation_date', timestring=None, field=None, stats_result='min_value', exclude=False, threshold_behavior='greater_than')

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.

threshold_behavior, when set to greater_than (default), includes if it the index tests to be larger than disk_space. When set to less_than, it includes if the index is smaller than disk_space

Parameters:
  • disk_space – Filter indices over n gigabytes
  • threshold_behavior – Size to filter, either greater_than or less_than. Defaults to greater_than to preserve backwards compatability.
  • reverse – The filtering direction. (default: True). Ignored if use_age is True
  • use_age – Sort indices by age. source is required in this case.
  • source – Source of index age. Can be one of name, creation_date, or field_stats. Default: creation_date
  • timestring – An strftime string to match the datestamp in an index name. Only used if source name is selected.
  • field – A timestamp field name. Only used if source field_stats is selected.
  • stats_result – Either min_value or max_value. Only used if source field_stats is selected. It determines whether to reference the minimum or maximum value of field in each index.
  • 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 False
IndexList.filter_closed(exclude=True)

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
IndexList.filter_forceMerged(max_num_segments=None, exclude=True)

Match any index which has max_num_segments per shard or fewer in the actionable list.

Parameters:
  • max_num_segments – Cutoff number of segments per shard.
  • 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
IndexList.filter_kibana(exclude=True)

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
IndexList.filter_opened(exclude=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
IndexList.filter_none()
IndexList.filter_by_alias(aliases=None, exclude=False)

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:
  • aliases (list) – A list of alias names.
  • 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 False
IndexList.filter_by_count(count=None, reverse=True, use_age=False, pattern=None, source='creation_date', timestring=None, field=None, stats_result='min_value', exclude=True)

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:
  • count – Filter indices beyond count.
  • reverse – The filtering direction. (default: True).
  • use_age – Sort indices by age. source is required in this case.
  • pattern – Select indices to count from a regular expression pattern. This pattern must have one and only one capture group. This can allow a single count filter instance to operate against any number of matching patterns, and keep count of each index in that group. For example, given a pattern of '^(.*)-\d{6}$', it will match both rollover-000001 and index-999990, but not logstash-2017.10.12. Following the same example, if my cluster also had rollover-000002 through rollover-000010 and index-888888 through index-999999, it will process both groups of indices, and include or exclude the count of each.
  • source – Source of index age. Can be one of name, creation_date, or field_stats. Default: creation_date
  • timestring – An strftime string to match the datestamp in an index name. Only used if source name is selected.
  • field – A timestamp field name. Only used if source field_stats is selected.
  • stats_result – Either min_value or max_value. Only used if source field_stats is selected. It determines whether to reference the minimum or maximum value of field in each index.
  • 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
IndexList.filter_period(period_type='relative', source='name', range_from=None, range_to=None, date_from=None, date_to=None, date_from_format=None, date_to_format=None, timestring=None, unit=None, field=None, stats_result='min_value', intersect=False, week_starts_on='sunday', epoch=None, exclude=False)

Match indices within ages within a given period.

Parameters:
  • period_type – Can be either absolute or relative. Default is relative. date_from and date_to are required when using period_type='absolute'`. ``range_from and range_to are required with ``period_type=’relative’`.
  • source – Source of index age. Can be one of ‘name’, ‘creation_date’, or ‘field_stats’
  • range_from – How many unit (s) in the past/future is the origin?
  • range_to – How many unit (s) in the past/future is the end point?
  • date_from – The simplified date for the start of the range
  • date_to – The simplified date for the end of the range. If this value is the same as date_from, the full value of unit will be extrapolated for the range. For example, if unit is months, and date_from and date_to are both 2017.01, then the entire month of January 2017 will be the absolute date range.
  • date_from_format – The strftime string used to parse date_from
  • date_to_format – The strftime string used to parse date_to
  • timestring – An strftime string to match the datestamp in an index name. Only used for index filtering by name.
  • unit – One of hours, days, weeks, months, or years.
  • unit_count – The number of unit (s). unit_count * unit will be calculated out to the relative number of seconds.
  • field – A timestamp field name. Only used for field_stats based calculations.
  • stats_result – Either min_value or max_value. Only used in conjunction with source``=``field_stats to choose whether to reference the minimum or maximum result value.
  • intersect – Only used when source``=``field_stats. If True, only indices where both min_value and max_value are within the period will be selected. If False, it will use whichever you specified. Default is False to preserve expected behavior.
  • week_starts_on – Either sunday or monday. Default is sunday
  • epoch – An epoch timestamp used to establish a point of reference for calculations. If not provided, the current time will be used.
  • 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 False

SnapshotList

SnapshotList.filter_by_age(source='creation_date', direction=None, timestring=None, unit=None, unit_count=None, epoch=None, exclude=False)

Remove snapshots from snapshots by relative age calculations.

Parameters:
  • source – Source of snapshot age. Can be ‘name’, or ‘creation_date’.
  • direction – Time to filter, either older or younger
  • timestring – An strftime string to match the datestamp in an snapshot name. Only used for snapshot filtering by name.
  • unit – One of seconds, minutes, hours, days, weeks, months, or years.
  • unit_count – The number of unit (s). unit_count * unit will be calculated out to the relative number of seconds.
  • epoch – An epoch timestamp used in conjunction with unit and unit_count to establish a point of reference for calculations. If not provided, the current time will be used.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is False
SnapshotList.filter_by_regex(kind=None, value=None, exclude=False)

Filter out snapshots not matching the pattern, or in the case of exclude, filter those matching the pattern.

Parameters:
  • kind – Can be one of: suffix, prefix, regex, or timestring. This option defines what kind of filter you will be building.
  • value – Depends on kind. It is the strftime string if kind is timestring. It’s used to build the regular expression for other kinds.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is False
SnapshotList.filter_by_state(state=None, exclude=False)

Filter out snapshots not matching state, or in the case of exclude, filter those matching state.

Parameters:
  • state – The snapshot state to filter for. Must be one of SUCCESS, PARTIAL, FAILED, or IN_PROGRESS.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is False
SnapshotList.filter_none()
SnapshotList.filter_by_count(count=None, reverse=True, use_age=False, source='creation_date', timestring=None, exclude=True)

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:
  • count – Filter snapshots beyond count.
  • reverse – The filtering direction. (default: True).
  • use_age – Sort snapshots by age. source is required in this case.
  • source – Source of snapshot age. Can be one of name, or creation_date. Default: creation_date
  • timestring – An strftime string to match the datestamp in a snapshot name. Only used if source name is selected.
  • exclude – If exclude is True, this filter will remove matching snapshots from snapshots. If exclude is False, then only matching snapshots will be kept in snapshots. Default is True
SnapshotList.filter_period(source='name', range_from=None, range_to=None, timestring=None, unit=None, field=None, stats_result='min_value', week_starts_on='sunday', epoch=None, exclude=False)

Match indices within ages within a given period.

Parameters:
  • source – Source of snapshot age. Can be ‘name’, or ‘creation_date’.
  • range_from – How many unit (s) in the past/future is the origin?
  • range_to – How many unit (s) in the past/future is the end point?
  • timestring – An strftime string to match the datestamp in an snapshot name. Only used for snapshot filtering by name.
  • unit – One of hours, days, weeks, months, or years.
  • week_starts_on – Either sunday or monday. Default is sunday
  • epoch – An epoch timestamp used to establish a point of reference for calculations. If not provided, the current time will be used.
  • 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 False

Utility & Helper Methods

class curator.utils.TimestringSearch(timestring)

An object to allow repetitive search against a string, searchme, without having to repeatedly recreate the regex.

Parameters:timestring – An strftime pattern
get_epoch(searchme)

Return the epoch timestamp extracted from the timestring appearing in searchme.

Parameters:searchme – A string to be searched for a date pattern that matches timestring
Return type:int
curator.utils.absolute_date_range(unit, date_from, date_to, date_from_format=None, date_to_format=None)

Get the epoch start time and end time of a range of unit``s, reckoning the start of the week (if that's the selected unit) based on ``week_starts_on, which can be either sunday or monday.

Parameters:
  • unit – One of hours, days, weeks, months, or years.
  • date_from – The simplified date for the start of the range
  • date_to – The simplified date for the end of the range. If this value is the same as date_from, the full value of unit will be extrapolated for the range. For example, if unit is months, and date_from and date_to are both 2017.01, then the entire month of January 2017 will be the absolute date range.
  • date_from_format – The strftime string used to parse date_from
  • date_to_format – The strftime string used to parse date_to
Return type:

tuple

curator.utils.byte_size(num, suffix='B')

Return a formatted string indicating the size in bytes, with the proper unit, e.g. KB, MB, GB, TB, etc.

Parameters:
  • num – The number of byte
  • suffix – An arbitrary suffix, like Bytes
Return type:

float

curator.utils.check_csv(value)

Some of the curator methods should not operate against multiple indices at once. This method can be used to check if a list or csv has been sent.

Parameters:value – The value to test, if list or csv string
Return type:bool
curator.utils.check_master(client, master_only=False)

Check if connected client is the elected master node of the cluster. If not, cleanly exit with a log message.

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:None
curator.utils.check_version(client)

Verify version is within acceptable range. Raise an exception if it is not.

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:None
curator.utils.chunk_index_list(indices)

This utility chunks very large index lists into 3KB chunks It measures the size as a csv string, then converts back into a list for the return value.

Parameters:indices – A list of indices to act on.
Return type:list
curator.utils.create_repo_body(repo_type=None, compress=True, chunk_size=None, max_restore_bytes_per_sec=None, max_snapshot_bytes_per_sec=None, location=None, bucket=None, region=None, base_path=None, access_key=None, secret_key=None, **kwargs)

Build the ‘body’ portion for use in creating a repository.

Parameters:
  • repo_type – The type of repository (presently only fs and s3)
  • compress – Turn on compression of the snapshot files. Compression is applied only to metadata files (index mapping and settings). Data files are not compressed. (Default: True)
  • chunk_size – The chunk size can be specified in bytes or by using size value notation, i.e. 1g, 10m, 5k. Defaults to null (unlimited chunk size).
  • max_restore_bytes_per_sec – Throttles per node restore rate. Defaults to 20mb per second.
  • max_snapshot_bytes_per_sec – Throttles per node snapshot rate. Defaults to 20mb per second.
  • location – Location of the snapshots. Required.
  • bucketS3 only. The name of the bucket to be used for snapshots. Required.
  • regionS3 only. The region where bucket is located. Defaults to US Standard
  • base_pathS3 only. Specifies the path within bucket to repository data. Defaults to value of repositories.s3.base_path or to root directory if not set.
  • access_keyS3 only. The access key to use for authentication. Defaults to value of cloud.aws.access_key.
  • secret_keyS3 only. The secret key to use for authentication. Defaults to value of cloud.aws.secret_key.
Returns:

A dictionary suitable for creating a repository from the provided arguments.

Return type:

dict

curator.utils.create_repository(client, **kwargs)

Create repository with repository and body settings

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • repository – The Elasticsearch snapshot repository to use
  • repo_type – The type of repository (presently only fs and s3)
  • compress – Turn on compression of the snapshot files. Compression is applied only to metadata files (index mapping and settings). Data files are not compressed. (Default: True)
  • chunk_size – The chunk size can be specified in bytes or by using size value notation, i.e. 1g, 10m, 5k. Defaults to null (unlimited chunk size).
  • max_restore_bytes_per_sec – Throttles per node restore rate. Defaults to 20mb per second.
  • max_snapshot_bytes_per_sec – Throttles per node snapshot rate. Defaults to 20mb per second.
  • location – Location of the snapshots. Required.
  • bucketS3 only. The name of the bucket to be used for snapshots. Required.
  • regionS3 only. The region where bucket is located. Defaults to US Standard
  • base_pathS3 only. Specifies the path within bucket to repository data. Defaults to value of repositories.s3.base_path or to root directory if not set.
  • access_keyS3 only. The access key to use for authentication. Defaults to value of cloud.aws.access_key.
  • secret_keyS3 only. The secret key to use for authentication. Defaults to value of cloud.aws.secret_key.
  • skip_repo_fs_check – Skip verifying the repo after creation.
Returns:

A boolean value indicating success or failure.

Return type:

bool

curator.utils.create_snapshot_body(indices, ignore_unavailable=False, include_global_state=True, partial=False)

Create the request body for creating a snapshot from the provided arguments.

Parameters:
  • indices – A single index, or list of indices to snapshot.
  • ignore_unavailable (bool) – Ignore unavailable shards/indices. (default: False)
  • include_global_state (bool) – Store cluster global state with snapshot. (default: True)
  • partial (bool) – Do not fail if primary shard is unavailable. (default: False)
Return type:

dict

curator.utils.date_range(unit, range_from, range_to, epoch=None, week_starts_on='sunday')

Get the epoch start time and end time of a range of unit``s, reckoning the start of the week (if that's the selected unit) based on ``week_starts_on, which can be either sunday or monday.

Parameters:
  • unit – One of hours, days, weeks, months, or years.
  • range_from – How many unit (s) in the past/future is the origin?
  • range_to – How many unit (s) in the past/future is the end point?
  • epoch – An epoch timestamp used to establish a point of reference for calculations.
  • week_starts_on – Either sunday or monday. Default is sunday
Return type:

tuple

curator.utils.ensure_list(indices)

Return a list, even if indices is a single value

Parameters:indices – A list of indices to act upon
Return type:list
curator.utils.find_snapshot_tasks(client)

Check if there is snapshot activity in the Tasks API. Return True if activity is found, or False

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:bool
curator.utils.fix_epoch(epoch)

Fix value of epoch to be epoch, which should be 10 or fewer digits long.

Parameters:epoch – An epoch timestamp, in epoch + milliseconds, or microsecond, or even nanoseconds.
Return type:int
curator.utils.get_client(**kwargs)
NOTE: AWS IAM parameters aws_sign_request and aws_region are
provided to facilitate request signing. The credentials will be fetched from the local environment as per the AWS documentation: http://amzn.to/2fRCGCt

AWS IAM parameters aws_key, aws_secret_key, and aws_region are provided for users that still have their keys included in the Curator config file.

Return an elasticsearch.Elasticsearch client object using the provided parameters. Any of the keyword arguments the elasticsearch.Elasticsearch client object can receive are valid, such as:

Parameters:
  • hosts (list) – A list of one or more Elasticsearch client hostnames or IP addresses to connect to. Can send a single host.
  • port (int) – The Elasticsearch client port to connect to.
  • url_prefix (str) – Optional url prefix, if needed to reach the Elasticsearch API (i.e., it’s not at the root level)
  • use_ssl (bool) – Whether to connect to the client via SSL/TLS
  • certificate – Path to SSL/TLS certificate
  • client_cert – Path to SSL/TLS client certificate (public key)
  • client_key – Path to SSL/TLS private key
  • aws_key – AWS IAM Access Key (Only used if the requests-aws4auth python module is installed)
  • aws_secret_key – AWS IAM Secret Access Key (Only used if the requests-aws4auth python module is installed)
  • aws_region – AWS Region (Only used if the requests-aws4auth python module is installed)
  • aws_sign_request
    Sign request to AWS (Only used if the requests-aws4auth
    and boto3 python modules are installed)
    arg aws_region:AWS Region where the cluster exists (Only used if the requests-aws4auth and boto3 python modules are installed)
  • ssl_no_validate (bool) – If True, do not validate the certificate chain. This is an insecure option and you will see warnings in the log output.
  • http_auth (str) – Authentication credentials in user:pass format.
  • timeout (int) – Number of seconds before the client will timeout.
  • master_only (bool) – If True, the client will only connect if the endpoint is the elected master node of the cluster. This option does not work if `hosts` has more than one value. It will raise an Exception in that case.
  • skip_version_test – If True, skip the version check as part of the client connection.
Return type:

elasticsearch.Elasticsearch

curator.utils.get_date_regex(timestring)

Return a regex string based on a provided strftime timestring.

Parameters:timestring – An strftime pattern
Return type:str
curator.utils.get_datetime(index_timestamp, timestring)

Return the datetime extracted from the index name, which is the index creation time.

Parameters:
  • index_timestamp – The timestamp extracted from an index name
  • timestring – An strftime pattern
Return type:

datetime.datetime

curator.utils.get_indices(client)

Get the current list of indices from the cluster.

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:list
curator.utils.get_point_of_reference(unit, count, epoch=None)

Get a point-of-reference timestamp in epoch + milliseconds by deriving from a unit and a count, and an optional reference timestamp, epoch

Parameters:
  • unit – One of seconds, minutes, hours, days, weeks, months, or years.
  • unit_count – The number of units. unit_count * unit will be calculated out to the relative number of seconds.
  • epoch – An epoch timestamp used in conjunction with unit and unit_count to establish a point of reference for calculations.
Return type:

int

curator.utils.get_repository(client, repository='')

Return configuration information for the indicated repository.

Parameters:
Return type:

dict

curator.utils.get_snapshot(client, repository=None, snapshot='')

Return information about a snapshot (or a comma-separated list of snapshots) If no snapshot specified, it will return all snapshots. If none exist, an empty dictionary will be returned.

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • repository – The Elasticsearch snapshot repository to use
  • snapshot – The snapshot name, or a comma-separated list of snapshots
Return type:

dict

curator.utils.get_snapshot_data(client, repository=None)

Get _all snapshots from repository and return a list.

Parameters:
Return type:

list

curator.utils.get_version(client)

Return the ES version number as a tuple. Omits trailing tags like -dev, or Beta

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:tuple
curator.utils.get_yaml(path)

Read the file identified by path and import its YAML contents.

Parameters:path – The path to a YAML configuration file.
Return type:dict
curator.utils.health_check(client, **kwargs)

This function calls client.cluster.health and, based on the args provided, will return True or False depending on whether that particular keyword appears in the output, and has the expected value. If multiple keys are provided, all must match for a True response.

Parameters:client – An elasticsearch.Elasticsearch client object
curator.utils.is_master_node(client)

Return True if the connected client node is the elected master node in the Elasticsearch cluster, otherwise return False.

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:bool
curator.utils.name_to_node_id(client, name)

Return the node_id of the node identified by name

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:str
curator.utils.node_id_to_name(client, node_id)

Return the name of the node identified by node_id

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:str
curator.utils.node_roles(client, node_id)

Return the list of roles assigned to the node identified by node_id

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:list
curator.utils.parse_date_pattern(name)

Scan and parse name for time.strftime() strings, replacing them with the associated value when found, but otherwise returning lowercase values, as uppercase snapshot names are not allowed. It will detect if the first character is a <, which would indicate name is going to be using Elasticsearch date math syntax, and skip accordingly.

The time.strftime() identifiers that Curator currently recognizes as acceptable include:

  • Y: A 4 digit year
  • y: A 2 digit year
  • m: The 2 digit month
  • W: The 2 digit week of the year
  • d: The 2 digit day of the month
  • H: The 2 digit hour of the day, in 24 hour notation
  • M: The 2 digit minute of the hour
  • S: The 2 digit number of second of the minute
  • j: The 3 digit day of the year
Parameters:name – A name, which can contain time.strftime() strings
curator.utils.prune_nones(mydict)

Remove keys from mydict whose values are None

Parameters:mydict – The dictionary to act on
Return type:dict
curator.utils.read_file(myfile)

Read a file and return the resulting data.

Parameters:myfile – A file to read.
Return type:str
curator.utils.report_failure(exception)

Raise a FailedExecution exception and include the original error message.

Parameters:exception – The upstream exception.
Return type:None
curator.utils.repository_exists(client, repository=None)

Verify the existence of a repository

Parameters:
Return type:

bool

curator.utils.restore_check(client, index_list)

This function calls client.indices.recovery with the list of indices to check for complete recovery. It will return True if recovery of those indices is complete, and False otherwise. It is designed to fail fast: if a single shard is encountered that is still recovering (not in DONE stage), it will immediately return False, rather than complete iterating over the rest of the response.

Parameters:
curator.utils.rollable_alias(client, alias)

Ensure that alias is an alias, and points to an index that can use the _rollover API.

Parameters:
curator.utils.safe_to_snap(client, repository=None, retry_interval=120, retry_count=3)

Ensure there are no snapshots in progress. Pause and retry accordingly

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • repository – The Elasticsearch snapshot repository to use
  • retry_interval – Number of seconds to delay betwen retries. Default: 120 (seconds)
  • retry_count – Number of attempts to make. Default: 3
Return type:

bool

curator.utils.show_dry_run(ilo, action, **kwargs)

Log dry run output with the action which would have been executed.

Parameters:
curator.utils.single_data_path(client, node_id)

In order for a shrink to work, it should be on a single filesystem, as shards cannot span filesystems. Return True if the node has a single filesystem, and False otherwise.

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:bool
curator.utils.snapshot_check(client, snapshot=None, repository=None)

This function calls client.snapshot.get and tests to see whether the snapshot is complete, and if so, with what status. It will log errors according to the result. If the snapshot is still IN_PROGRESS, it will return False. SUCCESS will be an INFO level message, PARTIAL nets a WARNING message, FAILED is an ERROR, message, and all others will be a WARNING level message.

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • snapshot – The name of the snapshot.
  • repository – The Elasticsearch snapshot repository to use
curator.utils.snapshot_in_progress(client, repository=None, snapshot=None)

Determine whether the provided snapshot in repository is IN_PROGRESS. If no value is provided for snapshot, then check all of them. Return snapshot if it is found to be in progress, or False

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • repository – The Elasticsearch snapshot repository to use
  • snapshot – The snapshot name
curator.utils.snapshot_running(client)

Return True if a snapshot is in progress, and False if not

Parameters:client – An elasticsearch.Elasticsearch client object
Return type:bool
curator.utils.task_check(client, task_id=None)

This function calls client.tasks.get with the provided task_id. If the task data contains 'completed': True, then it will return True If the task is not completed, it will log some information about the task and return False

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • task_id – A task_id which ostensibly matches a task searchable in the tasks API.
curator.utils.test_client_options(config)

Test whether a SSL/TLS files exist. Will raise an exception if the files cannot be read.

Parameters:config – A client configuration file data dictionary
Return type:None
curator.utils.test_repo_fs(client, repository=None)

Test whether all nodes have write access to the repository

Parameters:
curator.utils.to_csv(indices)

Return a csv string from a list of indices, or a single value if only one value is present

Parameters:indices – A list of indices to act on, or a single value, which could be in the format of a csv string already.
Return type:str
curator.utils.validate_actions(data)

Validate an Action configuration dictionary, as imported from actions.yml, for example.

The method returns a validated and sanitized configuration dictionary.

Parameters:data – The configuration dictionary
Return type:dict
curator.utils.validate_filters(action, filters)

Validate that the filters are appropriate for the action type, e.g. no index filters applied to a snapshot list.

Parameters:
  • action – An action name
  • filters – A list of filters to test.
curator.utils.verify_client_object(test)

Test if test is a proper elasticsearch.Elasticsearch client object and raise an exception if it is not.

Parameters:test – The variable or object to test
Return type:None
curator.utils.verify_index_list(test)

Test if test is a proper curator.indexlist.IndexList object and raise an exception if it is not.

Parameters:test – The variable or object to test
Return type:None
curator.utils.verify_snapshot_list(test)

Test if test is a proper curator.snapshotlist.SnapshotList object and raise an exception if it is not.

Parameters:test – The variable or object to test
Return type:None
curator.utils.wait_for_it(client, action, task_id=None, snapshot=None, repository=None, index_list=None, wait_interval=9, max_wait=-1)

This function becomes one place to do all wait_for_completion type behaviors

Parameters:
  • client – An elasticsearch.Elasticsearch client object
  • action – The action name that will identify how to wait
  • task_id – If the action provided a task_id, this is where it must be declared.
  • snapshot – The name of the snapshot.
  • repository – The Elasticsearch snapshot repository to use
  • wait_interval – How frequently the specified “wait” behavior will be polled to check for completion.
  • max_wait – Number of seconds will the “wait” behavior persist before giving up and raising an Exception. The default is -1, meaning it will try forever.
class curator.SchemaCheck(config, schema, test_what, location)

Validate config with the provided voluptuous schema. test_what and location are for reporting the results, in case of failure. If validation is successful, the method returns config as valid.

Parameters:
  • config (dict) – A configuration dictionary.
  • schema (voluptuous.Schema) – A voluptuous schema definition
  • test_what (str) – which configuration block is being validated
  • location (str) – An string to report which configuration sub-block is being tested.

Examples

Each of these examples presupposes that the requisite modules have been imported and an instance of the Elasticsearch client object has been created:

import elasticsearch
import curator

client = elasticsearch.Elasticsearch()

Filter indices by prefix

ilo = curator.IndexList(client)
ilo.filter_by_regex(kind='prefix', value='logstash-')

The contents of ilo.indices would then only be indices matching the prefix.

Filter indices by suffix

ilo = curator.IndexList(client)
ilo.filter_by_regex(kind='suffix', value='-prod')

The contents of ilo.indices would then only be indices matching the suffix.

Filter indices by age (name)

This example will match indices with the following criteria:

  • Have a date string of %Y.%m.%d
  • Use days as the unit of time measurement
  • Filter indices older than 5 days
ilo = curator.IndexList(client)
ilo.filter_by_age(source='name', direction='older', timestring='%Y.%m.%d',
    unit='days', unit_count=5
)

The contents of ilo.indices would then only be indices matching these criteria.

Filter indices by age (creation_date)

This example will match indices with the following criteria:

  • Use months as the unit of time measurement
  • Filter indices where the index creation date is older than 2 months from this moment.
ilo = curator.IndexList(client)
ilo.filter_by_age(source='creation_date', direction='older',
    unit='months', unit_count=2
)

The contents of ilo.indices would then only be indices matching these criteria.

Filter indices by age (field_stats)

This example will match indices with the following criteria:

  • Use days as the unit of time measurement
  • Filter indices where the timestamp field’s min_value is a date older than 3 weeks from this moment.
ilo = curator.IndexList(client)
ilo.filter_by_age(source='field_stats', direction='older',
    unit='weeks', unit_count=3, field='timestamp', stats_result='min_value'
)

The contents of ilo.indices would then only be indices matching these criteria.

Changelog

5.3.0 (31 October 2017)

New Features

  • With the period filter and field_stats, it is useful to match indices that fit within the period, rather than just their start dates. This is now possible with intersect. See more in the documentation. Requested in #1045. (untergeek)
  • Add a restore function to curator_cli singleton. Mentioned in #851 (alexef)
  • Add pattern to the count filter. This is particularly useful when working with rollover indices. Requested in #1044 (untergeek)
  • The es_repo_mgr create command now can take skip_repo_fs_check as an argument (default is False) #1072 (alexef)
  • Add pattern_type feature expansion to the period filter. The default behavior is pattern_type='relative', which preserves existing behaviors so users with existing configurations can continue to use them without interruption. The new pattern_type is absolute, which allows you to specify hard dates for date_from and date_to, while date_from_format and date_to_format are strftime strings to interpret the from and to dates. Requested in #1047 (untergeek)
  • Add copy_aliases option to the shrink action. So this option is only set in the shrink action. The default value of the option is copy_aliases: 'False' and it does nothing. If you set to copy_aliases: 'True', you could copy the aliases from the source index to the target index. Requested in #1060 (monkey3199)
  • IAM Credentials can now be retrieved from the environment using the Boto3 Credentials provider. #1084 (kobuskc)

Bug Fixes

  • Delete the target index (if it exists) in the event that a shrink fails. Requested in #1058 (untergeek)
  • Fixed an integration test that could fail in the waning days of a month.
  • Fix build system anomalies for both unix and windows.

Documentation

  • Set repository access to be https by default.
  • Add documentation for copy_aliases option.

5.2.0 (1 September 2017)

New Features

  • Shrink action! Apologies to all who have patiently waited for this feature. It’s been a long time coming, but it is hopefully worth the wait. There are a lot of checks and tests associated with this action, as there are many conditions that have to be met in order for a shrink to take place. Curator will try its best to ensure that all of these conditions are met so you can comfortably rest assured that shrink will work properly unattended. See the documentation for more information.
  • The cli function has been split into cli and run functions. The behavior of cli will be indistinguishable from previous releases, preserving API integrity. The new run function allows lambda and other users to run Curator from the API with only a client configuration file and action file as arguments. Requested in #1031 (untergeek)
  • Allow use of time/date string interpolation for Rollover index naming. Added in #1010 (tschroeder-zendesk)
  • New unit_count_pattern allows you to derive the unit_count from the index name itself. This involves regular expressions, so be sure to do lots of testing in --dry-run mode before deploying to production. Added by (soenkeliebau) in #997

Bug Fixes

  • Reindex request_body allows for 2 different size options. One limits the number of documents reindexed. The other is for batch sizing. The batch sizing option was missing from the schema validator. This has been corrected. Reported in #1038 (untergeek)
  • A few sundry logging and notification changes were made.

5.1.2 (08 August 2017)

Errata

  • An update to Elasticsearch 5.5.0 changes the behavior of filter_by_aliases, differing from previous 5.x versions.

    If a list of aliases is provided, indices must appear in _all_ listed 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.

    Tests and documentation have been updated to address these changes.

  • Debian 9 changed SSL versions, which means that the pre-built debian packages no longer work in Debian 9. In the short term, this requires a new repository. In the long term, I will try to get a better repository system working for these so they all work together, better. Requested in #998 (untergeek)

Bug Fixes

  • Support date math in reindex operations better. It did work previously, but would report failure because the test was looking for the index with that name from a list of indices, rather than letting Elasticsearch do the date math. Reported by DPattee in #1008 (untergeek)
  • Under rare circumstances, snapshot delete (or create) actions could fail, even when there were no snapshots in state IN_PROGRESS. This was tracked down by JD557 as a collision with a previously deleted snapshot that hadn’t finished deleting. It could be seen in the tasks API. An additional test for snapshot activity in the tasks API has been added to cover this scenario. Reported in #999 (untergeek)
  • The restore_check function did not work properly with wildcard index patterns. This has been rectified, and an integration test added to satisfy this. Reported in #989 (untergeek)
  • Make Curator report the Curator version, and not just reiterate the elasticsearch version when reporting version incompatibilities. Reported in #992. (untergeek)
  • Fix repository/snapshot name logging issue. #1005 (jpcarey)
  • Fix Windows build issue #1014 (untergeek)

Documentation

  • Fix/improve rST API documentation.
  • Thanks to many users who not only found and reported documentation issues, but also submitted corrections.

License

Copyright (c) 2012–2017 Elasticsearch <http://www.elastic.co>

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Indices and tables