elasticsearch/docs/reference/ccr/auto-follow.asciidoc
Adam Locke 6940673e8a
[DOCS] Update remote cluster docs (#77043)
* [DOCS] Update remote cluster docs

* Add files, rename files, write new stuff

* Plethora of changes

* Add test and update snippets

* Redirects, moved files, and test updates

* Moved file to x-pack for tests

* Remove older CCS page and add redirects

* Cleanup, link updates, and some rewrites

* Update image

* Incorporating user feedback and rewriting much of the remote clusters page

* More changes from review feedback

* Numerous updates, including request examples for CCS and Kibana

* More changes from review feedback

* Minor clarifications on security for remote clusters

* Incorporate review feedback

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Some review feedback and some editorial changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
2021-09-22 16:02:33 -04:00

83 lines
3.8 KiB
Text

[role="xpack"]
[testenv="platinum"]
[[ccr-auto-follow]]
=== Manage auto-follow patterns
To replicate time series indices, you configure an auto-follow pattern so that
each new index in the series is replicated automatically. Whenever the name of
a new index on the remote cluster matches the auto-follow pattern, a
corresponding follower index is added to the local cluster.
NOTE: Auto-follow patterns only match open indices on the remote cluster that
have all primary shards started. Auto-follow patterns do not match indices that
can't be used for {ccr-init} such as <<open-index-api-desc,closed indices>> or
<<searchable-snapshots,{search-snaps}>>. Avoid using an auto-follow pattern
that matches indices with a <<index-block-settings, read or write block>>. These
blocks prevent follower indices from replicating such indices.
You can also create auto-follow patterns for data streams. When a new backing
index is generated on a remote cluster, that index and its data stream are
automatically followed if the data stream name matches an auto-follow
pattern. If you create a data stream after creating the auto-follow pattern,
all backing indices are followed automatically.
The data streams replicated from a remote cluster by CCR are protected from
local rollovers. The <<promote-data-stream-api,promote data stream API>>
can be used to turn these data streams into regular data streams.
Auto-follow patterns are especially useful with
<<index-lifecycle-management,{ilm-cap}>>, which might continually create
new indices on the cluster containing the leader index.
[[ccr-access-ccr-auto-follow]]
To start using {ccr} auto-follow patterns from Stack Management in {kib}, select
*Cross-Cluster Replication* from the side navigation and choose the
*Auto-follow patterns* tab.
[[ccr-auto-follow-create]]
==== Create auto-follow patterns
When you <<ccr-getting-started-auto-follow,create an auto-follow pattern>>,
you are configuring a collection of patterns against a single remote cluster.
When an index is created in the remote cluster with a name that matches one of
the patterns in the collection, a follower index is configured in the local
cluster. The follower index uses the new index as its leader index.
Use the <<ccr-put-auto-follow-pattern,create auto-follow pattern API>> to add a
new auto-follow pattern configuration.
[[ccr-auto-follow-retrieve]]
==== Retrieve auto-follow patterns
To view existing auto-follow patterns and make changes to the backing
patterns, <<ccr-access-ccr-auto-follow,access {kib}>> on your _remote_ cluster.
Select the auto-follow pattern that you want to view details about. From there,
you can make changes to the auto-follow pattern. You can also view your
follower indices included in the auto-follow pattern.
Use the <<ccr-get-auto-follow-pattern,get auto-follow pattern API>> to inspect
all configured auto-follow pattern collections.
[[ccr-auto-follow-pause]]
==== Pause and resume auto-follow patterns
To pause and resume replication of auto-follow pattern collections,
<<ccr-access-ccr-auto-follow,access {kib}>>, select the auto-follow pattern,
and pause replication.
To resume replication, select the pattern and choose
*Manage pattern > Resume replication*.
Use the <<ccr-pause-auto-follow-pattern,pause auto-follow pattern API>> to
pause auto-follow patterns.
Use the <<ccr-resume-auto-follow-pattern,resume auto-follow pattern API>> to
resume auto-follow patterns.
[[ccr-auto-follow-delete]]
==== Delete auto-follow patterns
To delete an auto-follow pattern collection,
<<ccr-access-ccr-auto-follow,access {kib}>>, select the auto-follow pattern,
and pause replication.
When the pattern status changes to Paused, choose
*Manage pattern > Delete pattern*.
Use the <<ccr-delete-auto-follow-pattern,delete auto-follow pattern API>> to
delete a configured auto-follow pattern collection.