查看节点状态信息

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

{  
  "ok" : true,  // 集群状态  
  "cluster_name" : "if2c", //集群名称  
  "nodes" : {  
    "bT7UoS9nR4aVowpZ7KSQXQ" : {  //节点UID  
      "name" : "test123", //节点名称  
      "transport_address" : "inet[10.0.2.226/10.0.2.226:8300]", TCP交流IP及端口  
      "hostname" : "memcached-2", //机器名称  
      "version" : "0.90.9", ES版本  
      "http_address" : "inet[/10.0.2.226:8200]", //HTTP查询端口,为插件提供监控  
      "attributes" : {  
        "rack" : "racktest123", //机柜ID,跨机柜部署集群,以防某一个机柜断电影响ES服务  
        "master" : "true" //是否是主节点  
      }  
    }  
  }  
}  

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

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

也可以使用通配符查询

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

 

原文地址:https://www.cnblogs.com/yaomajor/p/8157663.html