下载zip包,运行,然后启动bat,
检查health,官网说curl http://localhost:9200/_cat/health?v
这一下子就懵逼了,windows下哪有curl啊,心想是不是环境变量没有配置,去官网找也没有配置环境变量的,
最后搜一下发现window直接在浏览器输入网址就可以了,然后我们输入:http://localhost:9200/_cat/health?v
结果是这样的:
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 1464313326 09:42:06 elasticsearch green 1 1 0 0 0 0 0 0 - 100.0%status表示状态,有三种,红,黄,绿
绿: 一切OK,集群是全功能的
黄:数据可用但是一些replicas(复制品)没有分配,但是集群还是全功能的,那问题是啥?
eepoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1464313610 09:46:50 wenda_cluster_name yellow 1 1 5 5 0 0 5 0 - 50.0%
红:意味着一些数据不可用因为一些原因
即使是红的,集群还是部分功能可用(可用的shard会提供搜索服务),但是我们需要尽快修复,因为丢失了数据。
查看所有的结点:
localhost:9200/_cat/nodes?v
列出了我们自己的所有node结点:
host ip heap.percent ram.percent load node.role master name 127.0.0.1 127.0.0.1 7 39 -1.00 d * Beta Ray Bill