get-follow-info.asciidoc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. [role="xpack"]
  2. [[ccr-get-follow-info]]
  3. === Get follower info API
  4. ++++
  5. <titleabbrev>Get follower info</titleabbrev>
  6. ++++
  7. Retrieves information about all follower indices.
  8. [[ccr-get-follow-info-request]]
  9. ==== {api-request-title}
  10. //////////////////////////
  11. [source,console]
  12. --------------------------------------------------
  13. PUT /follower_index/_ccr/follow?wait_for_active_shards=1
  14. {
  15. "remote_cluster" : "remote_cluster",
  16. "leader_index" : "leader_index"
  17. }
  18. --------------------------------------------------
  19. // TESTSETUP
  20. // TEST[setup:remote_cluster_and_leader_index]
  21. //////////////////////////
  22. [source,console]
  23. --------------------------------------------------
  24. GET /<index>/_ccr/info
  25. --------------------------------------------------
  26. // TEST[s/<index>/follower_index/]
  27. [[ccr-get-follow-info-prereqs]]
  28. ==== {api-prereq-title}
  29. * If the {es} {security-features} are enabled, you must have `monitor` cluster
  30. privileges. For more information, see <<security-privileges>>.
  31. [[ccr-get-follow-info-desc]]
  32. ==== {api-description-title}
  33. This API lists the parameters and the status for each follower index.
  34. For example, the results include follower index names, leader index names,
  35. replication options and whether the follower indices are active or paused.
  36. [[ccr-get-follow-info-path-parms]]
  37. ==== {api-path-parms-title}
  38. `<index>`::
  39. (Required, string) A comma-delimited list of follower index patterns.
  40. [role="child_attributes"]
  41. [[ccr-get-follow-info-response-body]]
  42. ==== {api-response-body-title}
  43. //Begin follower_indices
  44. `follower_indices`::
  45. (array) An array of follower index statistics.
  46. +
  47. .Properties of objects in `follower_indices`
  48. [%collapsible%open]
  49. ====
  50. `follower_index`::
  51. (string) The name of the follower index.
  52. `leader_index`::
  53. (string) The name of the index in the leader cluster that is followed.
  54. //Begin parameters
  55. `parameters`::
  56. (object) An object that encapsulates {ccr} parameters. If the follower index's `status` is `paused`,
  57. this object is omitted.
  58. +
  59. .Properties of `parameters`
  60. [%collapsible%open]
  61. =====
  62. `max_outstanding_read_requests`::
  63. (long) The maximum number of outstanding read requests from the remote cluster.
  64. `max_outstanding_write_requests`::
  65. (integer) The maximum number of outstanding write requests on the follower.
  66. `max_read_request_operation_count`::
  67. (integer) The maximum number of operations to pull per read from the remote
  68. cluster.
  69. `max_read_request_size`::
  70. (<<byte-units,byte value>>) The maximum size in bytes of per read of a batch of
  71. operations pulled from the remote cluster.
  72. `max_retry_delay`::
  73. (<<time-units,time value>>) The maximum time to wait before retrying an
  74. operation that failed exceptionally. An exponential backoff strategy is employed
  75. when retrying.
  76. `max_write_buffer_count`::
  77. (integer) The maximum number of operations that can be queued for writing. When
  78. this limit is reached, reads from the remote cluster are deferred until the
  79. number of queued operations goes below the limit.
  80. `max_write_buffer_size`::
  81. (<<byte-units,byte value>>) The maximum total bytes of operations that can be
  82. queued for writing. When this limit is reached, reads from the remote cluster
  83. are deferred until the total bytes of queued operations goes below the limit.
  84. `max_write_request_operation_count`::
  85. (integer) The maximum number of operations per bulk write request executed on
  86. the follower.
  87. `max_write_request_size`::
  88. (<<byte-units,byte value>>) The maximum total bytes of operations per bulk write
  89. request executed on the follower.
  90. `read_poll_timeout`::
  91. (<<time-units,time value>>) The maximum time to wait for new operations on the
  92. remote cluster when the follower index is synchronized with the leader index.
  93. When the timeout has elapsed, the poll for operations returns to the follower so
  94. that it can update some statistics, then the follower immediately attempts
  95. to read from the leader again.
  96. =====
  97. //End parameters
  98. `remote_cluster`::
  99. (string) The <<remote-clusters,remote cluster>> that contains the
  100. leader index.
  101. `status`::
  102. (string) Whether index following is `active` or `paused`.
  103. ====
  104. //End follower_indices
  105. [[ccr-get-follow-info-examples]]
  106. ==== {api-examples-title}
  107. This example retrieves follower info:
  108. [source,console]
  109. --------------------------------------------------
  110. GET /follower_index/_ccr/info
  111. --------------------------------------------------
  112. If the follower index is `active`, the API returns the following results:
  113. [source,console-result]
  114. --------------------------------------------------
  115. {
  116. "follower_indices": [
  117. {
  118. "follower_index": "follower_index",
  119. "remote_cluster": "remote_cluster",
  120. "leader_index": "leader_index",
  121. "status": "active",
  122. "parameters": {
  123. "max_read_request_operation_count": 5120,
  124. "max_read_request_size": "32mb",
  125. "max_outstanding_read_requests": 12,
  126. "max_write_request_operation_count": 5120,
  127. "max_write_request_size": "9223372036854775807b",
  128. "max_outstanding_write_requests": 9,
  129. "max_write_buffer_count": 2147483647,
  130. "max_write_buffer_size": "512mb",
  131. "max_retry_delay": "500ms",
  132. "read_poll_timeout": "1m"
  133. }
  134. }
  135. ]
  136. }
  137. --------------------------------------------------
  138. ////
  139. [source,console]
  140. --------------------------------------------------
  141. POST /follower_index/_ccr/pause_follow
  142. --------------------------------------------------
  143. // TEST[continued]
  144. [source,console]
  145. --------------------------------------------------
  146. GET /follower_index/_ccr/info
  147. --------------------------------------------------
  148. // TEST[continued]
  149. ////
  150. If the follower index is `paused`, the API returns the following results:
  151. [source,console-result]
  152. --------------------------------------------------
  153. {
  154. "follower_indices": [
  155. {
  156. "follower_index": "follower_index",
  157. "remote_cluster": "remote_cluster",
  158. "leader_index": "leader_index",
  159. "status": "paused"
  160. }
  161. ]
  162. }
  163. --------------------------------------------------