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