get-follow-info.asciidoc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-get-follow-info]]
  4. === Get follower info API
  5. ++++
  6. <titleabbrev>Get follower info</titleabbrev>
  7. ++++
  8. beta[]
  9. Retrieves information about all follower indices.
  10. ==== Description
  11. This API lists the parameters and the status for each follower index.
  12. For example, the results include follower index names, leader index names,
  13. replication options and whether the follower indices are active or paused.
  14. ==== Request
  15. //////////////////////////
  16. [source,js]
  17. --------------------------------------------------
  18. PUT /follower_index/_ccr/follow?wait_for_active_shards=1
  19. {
  20. "remote_cluster" : "remote_cluster",
  21. "leader_index" : "leader_index"
  22. }
  23. --------------------------------------------------
  24. // CONSOLE
  25. // TESTSETUP
  26. // TEST[setup:remote_cluster_and_leader_index]
  27. [source,js]
  28. --------------------------------------------------
  29. POST /follower_index/_ccr/pause_follow
  30. --------------------------------------------------
  31. // CONSOLE
  32. // TEARDOWN
  33. //////////////////////////
  34. [source,js]
  35. --------------------------------------------------
  36. GET /<index>/_ccr/info
  37. --------------------------------------------------
  38. // CONSOLE
  39. // TEST[s/<index>/follower_index/]
  40. ==== Path Parameters
  41. `index` ::
  42. (string) A comma-delimited list of follower index patterns
  43. ==== Results
  44. This API returns the following information:
  45. `follower_indices`::
  46. (array) An array of follower index statistics
  47. The `indices` array consists of objects containing several fields:
  48. `indices[].follower_index`::
  49. (string) The name of the follower index
  50. `indices[].remote_cluster`::
  51. (string) The <<modules-remote-clusters,remote cluster>> that contains the
  52. leader index
  53. `indices[].leader_index`::
  54. (string) The name of the index in the leader cluster that is followed
  55. `indices[].status`::
  56. (string) Whether index following is `active` or `paused`
  57. `indices[].parameters`::
  58. (object) An object that encapsulates {ccr} parameters
  59. The `parameters` contains the following fields:
  60. `indices[].parameters.max_read_request_operation_count`::
  61. (integer) The maximum number of operations to pull per read from the remote
  62. cluster
  63. `indices[].parameters.max_outstanding_read_requests`::
  64. (long) The maximum number of outstanding read requests from the remote cluster
  65. `indices[].parameters.max_read_request_size`::
  66. (<<byte-units,byte value>>) The maximum size in bytes of per read of a batch
  67. of operations pulled from the remote cluster
  68. `indices[].parameters.max_write_request_operation_count`::
  69. (integer) The maximum number of operations per bulk write request executed on
  70. the follower
  71. `indices[].parameters.max_write_request_size`::
  72. (<<byte-units,byte value>>) The maximum total bytes of operations per bulk
  73. write request executed on the follower
  74. `indices[].parameters.max_outstanding_write_requests`::
  75. (integer) The maximum number of outstanding write requests on the follower
  76. `indices[].parameters.max_write_buffer_count`::
  77. (integer) The maximum number of operations that can be queued for writing.
  78. When this limit is reached, reads from the remote cluster are deferred until
  79. the number of queued operations goes below the limit
  80. `indices[].parameters.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. `indices[].parameters.max_retry_delay`::
  85. (<<time-units,time value>>) The maximum time to wait before retrying an
  86. operation that failed exceptionally. An exponential backoff strategy is
  87. employed when retrying
  88. `indices[].parameters.read_poll_timeout`::
  89. (<<time-units,time value>>) The maximum time to wait for new operations on the
  90. remote cluster when the follower index is synchronized with the leader index.
  91. When the timeout has elapsed, the poll for operations returns to the follower
  92. so that it can update some statistics, then the follower immediately attempts
  93. to read from the leader again
  94. ==== Authorization
  95. If the {es} {security-features} are enabled, you must have `monitor` cluster
  96. privileges. For more information, see
  97. {stack-ov}/security-privileges.html[Security privileges].
  98. ==== Example
  99. This example retrieves follower info:
  100. [source,js]
  101. --------------------------------------------------
  102. GET /follower_index/_ccr/info
  103. --------------------------------------------------
  104. // CONSOLE
  105. The API returns the following results:
  106. [source,js]
  107. --------------------------------------------------
  108. {
  109. "follower_indices" : [
  110. {
  111. "follower_index" : "follower_index",
  112. "remote_cluster" : "remote_cluster",
  113. "leader_index" : "leader_index",
  114. "status" : "active",
  115. "parameters" : {
  116. "max_read_request_operation_count" : 5120,
  117. "max_read_request_size" : "32mb",
  118. "max_outstanding_read_requests" : 12,
  119. "max_write_request_operation_count" : 5120,
  120. "max_write_request_size" : "9223372036854775807b",
  121. "max_outstanding_write_requests" : 9,
  122. "max_write_buffer_count" : 2147483647,
  123. "max_write_buffer_size" : "512mb",
  124. "max_retry_delay" : "500ms",
  125. "read_poll_timeout" : "1m"
  126. }
  127. }
  128. ]
  129. }
  130. --------------------------------------------------
  131. // TESTRESPONSE