ElasticSearch7集群健康状态查看





http://localhost:9200/_cluster/health?pretty
{
   cluster_name: "elasticsearch",
   status: "green", // 集群的状态红绿灯,绿:健康,黄:亚健康,红:病态
   timed_out: false,
   number_of_nodes: 1, // 节点数
   number_of_data_nodes: 0, // 数据节点数
   active_primary_shards: 0, // 分片数,3个Index库
   active_shards: 0,
   relocating_shards: 0,
   initializing_shards: 0,
   unassigned_shards: 0, // 大于0未指定节点,配置了复本,仅使用一台机器部署会出现这种情况
   delayed_unassigned_shards: 0,
   number_of_pending_tasks: 0,
   number_of_in_flight_fetch: 0,
   task_max_waiting_in_queue_millis: 0,
   active_shards_percent_as_number: 100
 }

查看指定索引库的健康状态:

http://localhost:9200/_cluster/health/index_name?pretty
http://localhost:9200/_cluster/health/index_name,index_name2?pretty

查询ES集群节点状态:

curl http://localhost:9200/_cluster/nodes?pretty

根据IP查询集群中某台机器的状态:

curl http://localhost:9200/_cluster/nodes/10.0.2.226?pretty

使用通配符查询

curl http://localhost:9200/_cluster/nodes/10.0.2.2*?pretty

留下评论

电子邮件地址不会被公开。 必填项已用*标注