首页 > 其他 > 详细

Elasticsearch之基本使用

时间:2020-04-05 12:31:02      阅读:70      评论:0      收藏:0      [点我收藏+]

  这里介绍一下,平常使用频率较高的一些命令

 

1. 查看集群健康情况

http://localhost: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

 

 

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
1586056370 03:12:50  main-search green           9         7     50  25    0    0        0             0                  -                100.0%

说明:v是用来要求在结果中返回表头

状态值说明

Green - everything is good (cluster is fully functional),即最佳状态
Yellow - all data is available but some replicas are not yet allocated (cluster is fully functional),即数据和集群可用,但是集群的备份有的是坏的
Red - some data is not available for whatever reason (cluster is partially functional),即数据和集群都不可用

 

2. 查看所有节点

/_cat/nodes

 

3. 查看所有索引

http://localhost:9200/_cat/indices?v

green open .monitoring-kibana-7-2020.04.01 601ZG1FRQY688qAp3O1uaQ 1 1     8640       0   5.3mb   2.6mb
green open .monitoring-kibana-7-2020.04.02 J89ViHaQQC697nQ5gqMXtg 1 1     8639       0   5.3mb   2.6mb
green open .monitoring-kibana-7-2020.04.03 C-Sp-DDpTmWMZzdk1E3Wbw 1 1     3242       0   2.1mb     1mb
green open .monitoring-es-7-2020.04.05     3NT3phueS-qf76XDtwYKcw 1 1    34632   59482  60.6mb    31mb

 

4. 

 

Elasticsearch之基本使用

原文:https://www.cnblogs.com/xingxia/p/Elasticsearch_usage.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!