Elasticsearchのcat shards

Elasticsearchのcat shardsについて記す。

公式ドキュメント cat shards を参考にした。
www.elastic.co

検証環境: Elasticsearch 6.0.0-rc1

cat shardsはどのノードがどのシャードを含んでいるかを詳細に示したものである。

bash-3.2$ curl -XGET 'localhost:9200/_cat/shards?pretty'
bank          4 p STARTED    201  98.1kb 127.0.0.1 Xj840__
bank          4 r UNASSIGNED                       
bank          3 p STARTED    200  97.6kb 127.0.0.1 Xj840__
bank          3 r UNASSIGNED                       
bank          2 p STARTED    211 102.3kb 127.0.0.1 Xj840__
bank          2 r UNASSIGNED                       
bank          1 p STARTED    191  93.6kb 127.0.0.1 Xj840__
bank          1 r UNASSIGNED                       
bank          0 p STARTED    197  96.5kb 127.0.0.1 Xj840__
bank          0 r UNASSIGNED                       
noindextest   4 p STARTED      0    264b 127.0.0.1 Xj840__
noindextest   4 r UNASSIGNED                       
noindextest   1 p STARTED      0    264b 127.0.0.1 Xj840__
noindextest   1 r UNASSIGNED                       
noindextest   3 p STARTED      1   3.6kb 127.0.0.1 Xj840__
noindextest   3 r UNASSIGNED                       
noindextest   2 p STARTED      0    264b 127.0.0.1 Xj840__
noindextest   2 r UNASSIGNED                       
noindextest   0 p STARTED      0    264b 127.0.0.1 Xj840__
noindextest   0 r UNASSIGNED                       
indexusertest 4 p STARTED      0    264b 127.0.0.1 Xj840__
indexusertest 4 r UNASSIGNED                       
indexusertest 3 p STARTED      1   3.6kb 127.0.0.1 Xj840__
indexusertest 3 r UNASSIGNED                       
indexusertest 2 p STARTED      0    264b 127.0.0.1 Xj840__
indexusertest 2 r UNASSIGNED                       
indexusertest 1 p STARTED      0    264b 127.0.0.1 Xj840__
indexusertest 1 r UNASSIGNED                       
indexusertest 0 p STARTED      0    264b 127.0.0.1 Xj840__
indexusertest 0 r UNASSIGNED                       
customer      4 p STARTED      0    264b 127.0.0.1 Xj840__
customer      4 r UNASSIGNED                       
customer      1 p STARTED      0    264b 127.0.0.1 Xj840__
customer      1 r UNASSIGNED                       
customer      3 p STARTED      1   3.7kb 127.0.0.1 Xj840__
customer      3 r UNASSIGNED                       
customer      2 p STARTED      1   3.7kb 127.0.0.1 Xj840__
customer      2 r UNASSIGNED                       
customer      0 p STARTED      0    264b 127.0.0.1 Xj840__
customer      0 r UNASSIGNED                       
bash-3.2$ curl -XGET 'localhost:9200/_cat/shards?help&pretty'
index                        | i,idx                          | index name                                                                                                       
shard                        | s,sh                           | shard name                                                                                                       
prirep                       | p,pr,primaryOrReplica          | primary or replica                                                                                               
state                        | st                             | shard state                                                                                                      
docs                         | d,dc                           | number of docs in shard                                                                                          
store                        | sto                            | store size of shard (how much disk it uses)                                                                      
ip                           |                                | ip of node where it lives                                                                                        
id                           |                                | unique id of node where it lives                                                                                 
node                         | n                              | name of node where it lives                                                                                      
sync_id                      | sync_id                        | sync id                                                                                                          
unassigned.reason            | ur                             | reason shard is unassigned                                                                                       
unassigned.at                | ua                             | time shard became unassigned (UTC)                                                                               
unassigned.for               | uf                             | time has been unassigned                                                                                         
unassigned.details           | ud                             | additional details as to why the shard became unassigned                                                         
recoverysource.type          | rs                             | recovery source type                                                                                             
completion.size              | cs,completionSize              | size of completion                                                                                               
fielddata.memory_size        | fm,fielddataMemory             | used fielddata cache                                                                                             
fielddata.evictions          | fe,fielddataEvictions          | fielddata evictions                                                                                              
query_cache.memory_size      | qcm,queryCacheMemory           | used query cache                                                                                                 
query_cache.evictions        | qce,queryCacheEvictions        | query cache evictions                                                                                            
flush.total                  | ft,flushTotal                  | number of flushes                                                                                                
flush.total_time             | ftt,flushTotalTime             | time spent in flush                                                                                              
get.current                  | gc,getCurrent                  | number of current get ops                                                                                        
get.time                     | gti,getTime                    | time spent in get                                                                                                
get.total                    | gto,getTotal                   | number of get ops                                                                                                
get.exists_time              | geti,getExistsTime             | time spent in successful gets                                                                                    
get.exists_total             | geto,getExistsTotal            | number of successful gets                                                                                        
get.missing_time             | gmti,getMissingTime            | time spent in failed gets                                                                                        
get.missing_total            | gmto,getMissingTotal           | number of failed gets                                                                                            
indexing.delete_current      | idc,indexingDeleteCurrent      | number of current deletions                                                                                      
indexing.delete_time         | idti,indexingDeleteTime        | time spent in deletions                                                                                          
indexing.delete_total        | idto,indexingDeleteTotal       | number of delete ops                                                                                             
indexing.index_current       | iic,indexingIndexCurrent       | number of current indexing ops                                                                                   
indexing.index_time          | iiti,indexingIndexTime         | time spent in indexing                                                                                           
indexing.index_total         | iito,indexingIndexTotal        | number of indexing ops                                                                                           
indexing.index_failed        | iif,indexingIndexFailed        | number of failed indexing ops                                                                                    
merges.current               | mc,mergesCurrent               | number of current merges                                                                                         
merges.current_docs          | mcd,mergesCurrentDocs          | number of current merging docs                                                                                   
merges.current_size          | mcs,mergesCurrentSize          | size of current merges                                                                                           
merges.total                 | mt,mergesTotal                 | number of completed merge ops                                                                                    
merges.total_docs            | mtd,mergesTotalDocs            | docs merged                                                                                                      
merges.total_size            | mts,mergesTotalSize            | size merged                                                                                                      
merges.total_time            | mtt,mergesTotalTime            | time spent in merges                                                                                             
refresh.total                | rto,refreshTotal               | total refreshes                                                                                                  
refresh.time                 | rti,refreshTime                | time spent in refreshes                                                                                          
refresh.listeners            | rli,refreshListeners           | number of pending refresh listeners                                                                              
search.fetch_current         | sfc,searchFetchCurrent         | current fetch phase ops                                                                                          
search.fetch_time            | sfti,searchFetchTime           | time spent in fetch phase                                                                                        
search.fetch_total           | sfto,searchFetchTotal          | total fetch ops                                                                                                  
search.open_contexts         | so,searchOpenContexts          | open search contexts                                                                                             
search.query_current         | sqc,searchQueryCurrent         | current query phase ops                                                                                          
search.query_time            | sqti,searchQueryTime           | time spent in query phase                                                                                        
search.query_total           | sqto,searchQueryTotal          | total query phase ops                                                                                            
search.scroll_current        | scc,searchScrollCurrent        | open scroll contexts                                                                                             
search.scroll_time           | scti,searchScrollTime          | time scroll contexts held open                                                                                   
search.scroll_total          | scto,searchScrollTotal         | completed scroll contexts                                                                                        
segments.count               | sc,segmentsCount               | number of segments                                                                                               
segments.memory              | sm,segmentsMemory              | memory used by segments                                                                                          
segments.index_writer_memory | siwm,segmentsIndexWriterMemory | memory used by index writer                                                                                      
segments.version_map_memory  | svmm,segmentsVersionMapMemory  | memory used by version map                                                                                       
segments.fixed_bitset_memory | sfbm,fixedBitsetMemory         | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields
seq_no.max                   | sqm,maxSeqNo                   | max sequence number                                                                                              
seq_no.local_checkpoint      | sql,localCheckpoint            | local checkpoint                                                                                                 
seq_no.global_checkpoint     | sqg,globalCheckpoint           | global checkpoint                                                                                                
warmer.current               | wc,warmerCurrent               | current warmer ops                                                                                               
warmer.total                 | wto,warmerTotal                | total warmer ops                                                                                                 
warmer.total_time            | wtt,warmerTotalTime            | time spent in warmers                              
bash-3.2$ curl -XGET 'localhost:9200/_cat/shards/bank?v&pretty'
index shard prirep state      docs   store ip        node
bank  4     p      STARTED     201  98.1kb 127.0.0.1 Xj840__
bank  4     r      UNASSIGNED                        
bank  3     p      STARTED     200  97.6kb 127.0.0.1 Xj840__
bank  3     r      UNASSIGNED                        
bank  2     p      STARTED     211 102.3kb 127.0.0.1 Xj840__
bank  2     r      UNASSIGNED                        
bank  1     p      STARTED     191  93.6kb 127.0.0.1 Xj840__
bank  1     r      UNASSIGNED                        
bank  0     p      STARTED     197  96.5kb 127.0.0.1 Xj840__
bank  0     r      UNASSIGNED