对于Linux框中的弹性搜索群集 1)使用Elastic-Node1,Elastic-Node2,Elastic-Node3创建3个文件夹 2)使用./bin/elasticsearch
启动3个节点---Node1
[2014-09-03 11:20:24,731][INFO ][cluster.service ] [Danger] detected_master [Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]], added {[Alexander Summers][BkpTVquYRnyswIVyaZuYuA][localhost.localdomain][inet[/192.xxx.x13:9300]],[Conquest][2ZYcVV3USFmmrewPld7z0Q][localhost.localdomain][inet[/192.xxx.x13:9302]],[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]],[logstash-localhost.localdomain-2467-4038][smpAKj2iSp2bN7xvEYoM7g][localhost.localdomain][inet[/192.xxx.x13:9303]]{client=true, data=false},[logstash-localhost.localdomain-2163-4002][0zV7dRPgRqyTmRcbfw_5nA][localhost.localdomain][inet[/192.xxx.x13:9301]]{client=true, data=false},}, reason: zen-disco-receive(from master [[Virako][B7jkVnNsQIiLeSwIrkj
---Node2
[2014-09-03 11:21:16,552][INFO ][cluster.service ] [NFL Superpro] detected_master [Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]], added {[Danger][UqpWF27oQ7-TKkIJ63EOCQ][master][inet[/192.xxx.x88:9300]],[Alexander Summers][BkpTVquYRnyswIVyaZuYuA][localhost.localdomain][inet[/192.xxx.x13:9300]],[Conquest][2ZYcVV3USFmmrewPld7z0Q][localhost.localdomain][inet[/192.xxx.x13:9302]],[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]],[logstash-localhost.localdomain-2467-4038][smpAKj2iSp2bN7xvEYoM7g][localhost.localdomain][inet[/192.xxx.x13:9303]]{client=true, data=false},[logstash-localhost.localdomain-2163-4002][0zV7dRPgRqyTmRcbfw_5nA][localhost.localdomain][inet[/192.xxx.x13:9301]]{client=true, data=false},}, reason: zen-disco-receive(from master [[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]]])
----Node3
[2014-09-03 11:21:38,434][WARN ][discovery.zen.ping.multicast] [Catiana] received ping response ping_response{target [[NFL Superpro][dyjRr-ctRgmd8tpI2y397A][master][inet[/192.xxx.x88:9301]]], master [[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]]], cluster_name[elasticsearch]} with no matching id [1]
[2014-09-03 11:21:38,437][WARN ][discovery.zen.ping.multicast] [Catiana] received ping response ping_response{target [[Danger][UqpWF27oQ7-TKkIJ63EOCQ][master][inet[/192.xxx.x88:9300]]], master [[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]]], cluster_name[elasticsearch]} with no matching id [1]
[2014-09-03 11:21:39,155][INFO ][cluster.service ] [Catiana] detected_master [Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]], added {[Danger][UqpWF27oQ7-TKkIJ63EOCQ][master][inet[/192.xxx.x88:9300]],[Alexander Summers][BkpTVquYRnyswIVyaZuYuA][localhost.localdomain][inet[/192.xxx.x13:9300]],[Conquest][2ZYcVV3USFmmrewPld7z0Q][localhost.localdomain][inet[/192.xxx.x13:9302]],[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]],[logstash-localhost.localdomain-2467-4038][smpAKj2iSp2bN7xvEYoM7g][localhost.localdomain][inet[/192.xxx.x13:9303]]{client=true, data=false},[NFL Superpro][dyjRr-ctRgmd8tpI2y397A][master][inet[/192.xxx.x88:9301]],[logstash-localhost.localdomain-2163-4002][0zV7dRPgRqyTmRcbfw_5nA][localhost.localdomain][inet[/192.xxx.x13:9301]]{client=true, data=false},}, reason: zen-disco-receive(from master [[Virako][B7jkVnNsQIiLeSwIrkjhQA][localhost.localdomain][inet[/192.xxx.x23:9300]]])
3)当我在帮助它时给我开始Curl
curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 7,
"number_of_data_nodes" : 5,
"active_primary_shards" : 70,
"active_shards" : 140,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 142
}
4)curl -XGET 'http://192.xxx.x.xx:9200/_cluster/nodes?pretty=true
"我正在
No handler found for uri [/_cluster/nodes?pretty=true] and method [GET][
答案 0 :(得分:0)
elasticsearch documentation中没有/_cluster/nodes
API。您可能需要/_cluster/state API。还有一些易于阅读的优秀/_cat API。特别是如果您要确定哪些分片未分配,您可以使用/_cat/shards API。您还可以使用/_cat/nodes查看群集中当前有哪些节点(您可以传递一些额外的参数来查看其他内容的表格视图)。