Get follower stats.
This API gets follower stats. This API will return shard-level stats about the following tasks associated with each shard for the specified indices.
This API returns the following information:
indices
The indices
array consists of objects containing two fields:
indices[].index
indices[].shards
The shards
array consists of objects containing the following fields:
indices[].shards[].remote_cluster
indices[].shards[].leader_index
indices[].shards[].follower_index
indices[].shards[].shard_id
indices[].shards[].leader_global_checkpoint
indices[].shards[].leader_max_seq_no
indices[].shards[].follower_global_checkpoint
leader_global_checkpoint
and the follower_global_checkpoint
is an
indication of how much the follower is lagging the leader
indices[].shards[].follower_max_seq_no
indices[].shards[].last_requested_seq_no
indices[].shards[].outstanding_read_requests
indices[].shards[].outstanding_write_requests
indices[].shards[].write_buffer_operation_count
indices[].shards[].follower_mapping_version
indices[].shards[].follower_settings_version
indices[].shards[].total_read_time_millis
indices[].shards[].total_read_remote_exec_time_millis
indices[].shards[].successful_read_requests
indices[].shards[].failed_read_requests
indices[].shards[].operations_read
indices[].shards[].bytes_read
indices[].shards[].total_write_time_millis
indices[].shards[].write_buffer_size_in_bytes
indices[].shards[].successful_write_requests
indices[].shards[].failed_write_requests
indices[].shards[].operations_written
indices[].shards[].read_exceptions
The read_exceptions
array consists of objects containing the following
fields:
indices[].shards[].read_exceptions[].from_seq_no
indices[].shards[].read_exceptions[].retries
indices[].shards[].read_exceptions[].exception
Continuing with the fields from shards
:
indices[].shards[].time_since_last_read_millis
read_poll_timeout
at which point another read
request will be sent to the leader
indices[].fatal_exception
If the Elasticsearch security features are enabled, you must have monitor
cluster
privileges on the cluster that contains the follower index. For more information,
see Security privileges.
This example retrieves follower stats:
GET /follower_index/_ccr/stats
The API returns the following results:
{ "indices" : [ { "index" : "follower_index", "shards" : [ { "remote_cluster" : "remote_cluster", "leader_index" : "leader_index", "follower_index" : "follower_index", "shard_id" : 0, "leader_global_checkpoint" : 1024, "leader_max_seq_no" : 1536, "follower_global_checkpoint" : 768, "follower_max_seq_no" : 896, "last_requested_seq_no" : 897, "outstanding_read_requests" : 8, "outstanding_write_requests" : 2, "write_buffer_operation_count" : 64, "follower_mapping_version" : 4, "follower_settings_version" : 2, "total_read_time_millis" : 32768, "total_read_remote_exec_time_millis" : 16384, "successful_read_requests" : 32, "failed_read_requests" : 0, "operations_read" : 896, "bytes_read" : 32768, "total_write_time_millis" : 16384, "write_buffer_size_in_bytes" : 1536, "successful_write_requests" : 16, "failed_write_requests" : 0, "operations_written" : 832, "read_exceptions" : [ ], "time_since_last_read_millis" : 8 } ] } ] }