ES集群状态详细信息

我们经常说集群中包含的机器不能太多,shard数不能太多,master节点最好单独出来作为一个client节点,否则会导致主节点同步集群状态出现问题。
那么集群状态中到底有什么内容呢?

  • 所有的节点信息nodes
    8     "FP99h47FQfSJBZmbzkJ36g" : {
    9       "name" : "node-100.110.11.139-user_jk_master",
   10       "ephemeral_id" : "jt2t9V8OTOaf7Bjho_He2w",
   11       "transport_address" : "192.168.1.1:9300",
   12       "attributes" : {
   13         "zone" : "user",
   14         "box_type" : "use"
   15       }
   16     },
  • 所有的元数据信息metadata

    • template信息

      730       "watch_history_2" : {
      731         "template" : ".watcher-history-2*",
      732         "order" : 2147483647,
      733         "settings" : {
      734           "index" : {
      735             "number_of_shards" : "1",
      736             "mapper" : {
      737               "dynamic" : "false"
      738             },
      739             "xpack" : {
      740               "watcher" : {
      741                 "template" : {
      742                   "version" : "2"
      743                 }
      744               }
      745             }
      746           }
      747         },
      748         "mappings" : {
      749           "watch_record" : {
      750             "dynamic" : false,
      751             "dynamic_templates" : [
      752               {
      753                 "disabled_payload_fields" : {
      754                   "match_pattern" : "regex",
      755                   "path_match" : "result\\.(input(\\..+)*|(transform(\\..+)*)|(actions\\.transform(\\..+)*))\\.payload",
      756                   "mapping" : {
      757                     "type" : "object",
      758                     "enabled" : false
      759                   }
      760                 }
      761               },
      
    • 集群状态cluster_state

    • 索引状态index_stats

  • 所有索引的信息(mapping,setting,aliase,primary_terms,in_sync_allocations等等)indices

 2030       "xxx-20170817" : {
 2031         "state" : "open",
 2032         "settings" : {
 2033           "index" : {
 2034             "codec" : "best_compression",
 2035             "routing" : {
 2036               "allocation" : {
 2037                 "require" : {
 2038                   "box_type" : "user"
 2039                 }
 2040               }
 2041             },
 2042             "refresh_interval" : "-1",
 2043             "number_of_shards" : "32",
 2044             "provided_name" : "xxx-20170817",
 2045             "creation_date" : "1510008488732",
 2046             "number_of_replicas" : "0",
 2047             "uuid" : "W1IBSMEeQ7-y8GkCi1MizQ",
 2048             "version" : {
 2049               "created" : "5020099"
 2050             }
 2051           }
 2052         },
 2053         "mappings" : {
 2054           "xxx" : {
 2055             "_all" : {
 2056               "enabled" : false
 2057             },
 2058             "properties" : {
 2059               "login_ip_city" : {
 2060                 "index" : false,
 2061                 "type" : "text"
 2062               },
 2063               "time_section" : {
 2064                 "index" : false,
 2065                 "type" : "text"
 2066               },
  • 最近删除的索引信息
28361     "index-graveyard" : {
28362       "tombstones" : [
28363         {
28364           "index" : {
28365             "index_name" : "xxx-20171101",
28366             "index_uuid" : "s2wIm2eLQfC2H28GG7ykEA"
28367           },
28368           "delete_date_in_millis" : 1509810599494
28369         },
28370         {
28371           "index" : {
28372             "index_name" : "xxx-20171102",
28373             "index_uuid" : "2rUhivlxTn2dQqKZ2DPF6Q"
28374           },
28375           "delete_date_in_millis" : 1509810599494
28376         },
  • routing tables(每个索引的每个shard的allocation id)
    28470       "xxx-20170821" : {
    28471         "shards" : {
    28472           "3" : [
    28473             {
    28474               "state" : "STARTED",
    28475               "primary" : true,
    28476               "node" : "m75jcQ9xRa6UsYVv_a9ZCA",
    28477               "relocating_node" : null,
    28478               "shard" : 3,
    28479               "index" : "xxx-20170821",
    28480               "allocation_id" : {
    28481                 "id" : "A-ltJHfDS4aB8tHn4D355Q"
    28482               }
    28483             }
    28484           ],
    28485           "27" : [
    28486             {
    28487               "state" : "STARTED",
    28488               "primary" : true,
    28489               "node" : "8LOTVhBmQymr04zuTUsX9A",
    28490               "relocating_node" : null,
    28491               "shard" : 27,
    28492               "index" : "xxx-20170821",
    28493               "allocation_id" : {
    28494                 "id" : "hAIgZQfiT9Sr0DFv20Fj4Q"
    28495               }
    28496             }
    28497           ],
  • routing_nodes(节点上面保存的shard的allocation信息)
    63922     "nodes" : {
    63923       "hfbBcdUrQD-PlR56TMIDlg" : [
    63924         {
    63925           "state" : "STARTED",
    63926           "primary" : true,
    63927           "node" : "hfbBcdUrQD-PlR56TMIDlg",
    63928           "relocating_node" : null,
    63929           "shard" : 24,
    63930           "index" : "wxg_wechat_login_merge_result-20170821",
    63931           "allocation_id" : {
    63932             "id" : "fD0IjI7PT6KUPIDVghTN0w"
    63933           }
    63934         },
    63935         {
    63936           "state" : "STARTED",
    63937           "primary" : true,
    63938           "node" : "hfbBcdUrQD-PlR56TMIDlg",
    63939           "relocating_node" : null,
    63940           "shard" : 14,
    63941           "index" : "wxg_wechat_login_merge_result-20170821",
    63942           "allocation_id" : {
    63943             "id" : "PD1vOPBoSMaa9e02aegplA"
    63944           }
    63945         },

你可能感兴趣的:(ES集群状态详细信息)