get-follow-info.asciidoc 5.3 KB

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