auto-follow.asciidoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-auto-follow]]
  4. === Manage auto-follow patterns
  5. To replicate time series indices, you configure an auto-follow pattern so that
  6. each new index in the series is replicated automatically. Whenever the name of
  7. a new index on the remote cluster matches the auto-follow pattern, a
  8. corresponding follower index is added to the local cluster.
  9. NOTE: Auto-follow patterns only match open indices on the remote cluster that
  10. have all primary shards started. Auto-follow patterns do not match indices that
  11. can't be used for {ccr-init} such as <<open-index-api-desc,closed indices>> or
  12. <<searchable-snapshots,{search-snaps}>>. Avoid using an auto-follow pattern
  13. that matches indices with a <<index-block-settings, read or write block>>. These
  14. blocks prevent follower indices from replicating such indices.
  15. You can also create auto-follow patterns for data streams. When a new backing
  16. index is generated on a remote cluster, that index and its data stream are
  17. automatically followed if the data stream name matches an auto-follow
  18. pattern. If you create a data stream after creating the auto-follow pattern,
  19. all backing indices are followed automatically.
  20. The data streams replicated from a remote cluster by CCR are protected from
  21. local rollovers. The <<promote-data-stream-api,promote data stream API>>
  22. can be used to turn these data streams into regular data streams.
  23. Auto-follow patterns are especially useful with
  24. <<index-lifecycle-management,{ilm-cap}>>, which might continually create
  25. new indices on the cluster containing the leader index.
  26. [[ccr-access-ccr-auto-follow]]
  27. To start using {ccr} auto-follow patterns, access {kib} and go to
  28. *Management > Stack Management*. In the side navigation, select
  29. *Cross-Cluster Replication* and choose the *Auto-follow patterns* tab
  30. [[ccr-auto-follow-create]]
  31. ==== Create auto-follow patterns
  32. When you <<ccr-getting-started-auto-follow,create an auto-follow pattern>>,
  33. you are configuring a collection of patterns against a single remote cluster.
  34. When an index is created in the remote cluster with a name that matches one of
  35. the patterns in the collection, a follower index is configured in the local
  36. cluster. The follower index uses the new index as its leader index.
  37. [%collapsible]
  38. .Use the API
  39. ====
  40. Use the <<ccr-put-auto-follow-pattern,create auto-follow pattern API>> to add a
  41. new auto-follow pattern configuration.
  42. ====
  43. [[ccr-auto-follow-retrieve]]
  44. ==== Retrieve auto-follow patterns
  45. To view existing auto-follow patterns and make changes to the backing
  46. patterns, <<ccr-access-ccr-auto-follow,access {kib}>> on your _remote_ cluster.
  47. Select the auto-follow pattern that you want to view details about. From there,
  48. you can make changes to the auto-follow pattern. You can also view your
  49. follower indices included in the auto-follow pattern.
  50. [%collapsible]
  51. .Use the API
  52. ====
  53. Use the <<ccr-get-auto-follow-pattern,get auto-follow pattern API>> to inspect
  54. all configured auto-follow pattern collections.
  55. ====
  56. [[ccr-auto-follow-pause]]
  57. ==== Pause and resume auto-follow patterns
  58. To pause and resume replication of auto-follow pattern collections,
  59. <<ccr-access-ccr-auto-follow,access {kib}>>, select the auto-follow pattern,
  60. and pause replication.
  61. To resume replication, select the pattern and choose
  62. *Manage pattern > Resume replication*.
  63. [%collapsible]
  64. .Use the API
  65. ====
  66. Use the <<ccr-pause-auto-follow-pattern,pause auto-follow pattern API>> to
  67. pause auto-follow patterns.
  68. Use the <<ccr-resume-auto-follow-pattern,resume auto-follow pattern API>> to
  69. resume auto-follow patterns.
  70. ====
  71. [[ccr-auto-follow-delete]]
  72. ==== Delete auto-follow patterns
  73. To delete an auto-follow pattern collection,
  74. <<ccr-access-ccr-auto-follow,access {kib}>>, select the auto-follow pattern,
  75. and pause replication.
  76. When the pattern status changes to Paused, choose
  77. *Manage pattern > Delete pattern*.
  78. [%collapsible]
  79. .Use the API
  80. ====
  81. Use the <<ccr-delete-auto-follow-pattern,delete auto-follow pattern API>> to
  82. delete a configured auto-follow pattern collection.
  83. ====