赞
踩
注意:不同环境的ip不同
一般我们通过这个方式来验证ES服务器是否启动成功。
- [root@CENTOS01 ~]# curl http://192.168.1.101: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
- 1657076023 02:53:43 elasticsearch yellow 3 3 5445 2727 0 0 30 0 - 99.5%
参数说明:
1)、查看所有索引的分片信息
[root@CENTOS01 ~]# curl http://192.168.1.101:9200/_cat/shards?v
2)、查看指定索引的分片信息
- [root@CENTOS01 ~]# curl http://192.168.1.101:9200/_cat/shards/opt_log?v
- index shard prirep state docs store ip node
- opt_log 2 p STARTED 870711 88.8mb 192.168.1.101 node01
- opt_log 2 r STARTED 870711 88.6mb 192.168.1.103 node03
- opt_log 4 p STARTED 869587 88.7mb 192.168.1.101 node01
- opt_log 4 r STARTED 869587 89.1mb 192.168.1.103 node03
- opt_log 3 p STARTED 870962 88.5mb 192.168.1.101 node01
- opt_log 3 r STARTED 870962 88.7mb 192.168.1.102 node02
- opt_log 1 p STARTED 870468 88.7mb 192.168.1.101 node01
- opt_log 1 r STARTED 870468 88.8mb 192.168.1.103 node03
- opt_log 0 p STARTED 869894 88.7mb 192.168.1.101 node01
- opt_log 0 r STARTED 869894 89mb 192.168.1.102 node02
参数说明:
- [root@CENTOS01 ~]# curl http://192.168.1.101:9200/_cat/nodes?v
- ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
- 192.168.1.103 83 68 16 1.88 1.16 0.91 mdi - node03
- 192.168.1.101 58 67 6 0.33 0.34 0.42 mdi * node01
- 192.168.1.102 89 75 16 0.50 0.64 0.66 mdi - node02
参数说明:
1)、查看所有索引的分片信息
[root@CENTOS01 ~]# curl http://192.168.1.101:9200/_cat/indices?v
2)、查看指定索引的分片信息
- [root@CENTOS01 ~]# curl http://192.168.1.101:9200/_cat/indices/opt_log?v
- health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
- green open opt_log qqRywLNTTvCohc3OxiAZkw 5 1 231 0 2.5kb 1.2kb
参数说明:
[root@CENTOS01 ~]# curl http://192.168.1.101:9200/_cat
=^.^=
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/tasks
/_cat/indices
/_cat/indices/{index}
/_cat/segments
/_cat/segments/{index}
/_cat/count
/_cat/count/{index}
/_cat/recovery
/_cat/recovery/{index}
/_cat/health
/_cat/pending_tasks
/_cat/aliases
/_cat/aliases/{alias}
/_cat/thread_pool
/_cat/thread_pool/{thread_pools}
/_cat/plugins
/_cat/fielddata
/_cat/fielddata/{fields}
/_cat/nodeattrs
/_cat/repositories
/_cat/snapshots/{repository}
/_cat/templates
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。