可以使用 curl 命令来查看 Elasticsearch 集群的状态。 具体命令如下: bash curl -X GET "http://localhost:9200/_cluster/health?pretty" 这个命令会向 Elasticsearch 集群发送一个 GET 请求,查询集群的健康状态,并通过 pretty 参数将返回的 JSON 数据格式化,使其更易读。 http://localhost:9200 是Elasticsearch ...
curl -u elastic:123456-XGET'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_percent165011355612:52:36liangshan green11110000-100.0% 以上三个命令都是非业务相关,只关注业务的可以先...
curl -XGET http://localhost:9200/_cat/health?v 如果?后面加上pretty,能让返回的json格式化。 加上?v的返回结果,如下: epoch timestamp cluster status node.total node.datashards pri reloinitunassign pending_tasks max_task_wait_time active_shards_percent162299357723:32:57test green1009739252196190000-100...
curl -XPOST ‘http://localhost:9200/_cluster/nodes/192.168.1.1/_shutdown’ 关闭主节点 curl -XPOST ‘http://localhost:9200/_cluster/nodes/_master/_shutdown’ 关闭整个集群 $ curl -XPOST ‘http://localhost:9200/_shutdown?delay=10s’ $ curl -XPOST ‘http://localhost:9200/_cluster/nodes/_s...
1.1、查看集群健康状态 (GET _cluster/health) AI检测代码解析 curl -X GET 'http://127.0.0.1:9200/_cluster/health?pretty' { "cluster_name" : "elasticsearch-1", "status" : "green", "timed_out" : false, "number_of_nodes" : 3,
curl http://192.168.1.10:9200/_cluster/health?pretty { "cluster_name" : "es-test", "status" : "green", "timed_out" : false, "number_of_nodes" : 3, "number_of_data_nodes" : 3, "active_primary_shards" : 61, "active_shards" : 131, ...
[root@sh ~]# curl -s -XGET localhost:9200/_cluster/allocation/explain?pretty{"index":"twitter","shard":0,"primary":true,"current_state":"unassigned","unassigned_info":{"reason":"ALLOCATION_FAILED","at":"2018-11-06T06:11:15.562Z","failed_allocation_attempts":5,"details":"failed shar...
[root@elk-node03 ~]# curl -X GET 'http://10.0.8.47:9200/_cluster/health?pretty' { "cluster_name":"kevin-elk",#集群名称 "status":"green",#为 green 则代表健康没问题,如果是 yellow 或者 red 则是集群有问题 "timed_out":false,#是否有超时 ...
curl -XGET'localhost:9200/_cluster/health?level=indices'{"cluster_name":"elasticsearch","status":"yellow","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":278,"active_shards":278,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":278...
7.0以后相关配置cluster.fault开头,更改默认设置可能会导致群集变得不稳定,不建议修改。 使用discovery.zen.fd前缀设置来控制故障检测过程,配置如下: 集群状态更新 主节点是唯一一个能够更新集群状态的节点。主节点一次处理一个群集状态更新,应用所需的更改并将更新的群集状态发布到群集中的所有其他节点。当其他节点接收到...