群发资讯网

elasticsearch基础知识之查看集群信息

es是ElasticSearch,是全文搜索和分析引擎。

1.查看es集群状态:

curl -X GET http://x.x.x.x:9200/_cluster/health?pretty

状态是Green代表正常。

2.查看节点和角色:

curl -X GET http://x.x.x.x:9200/_cat/nodes?v

3.查看所有索引的状态:

curl -X GET http://x.x.x.x:9200/_cat/indices?v

4.查看迁移速度:

curl -X GET http://x.x.x.x:9200/_cat/allocation?v

5.查看es集群中节点的角色:

curl http://esip:9200/_cat/nodes?pretty

带*号的master是当前master节点,d是数据节点。

6.只看master节点:

curl http://esip:9200/_cat/master?v

7.查看es文件系统的使用率:

curl http://esip:9200/_cat/allocation?v

查看disk.percent列。

8.elasticsearch的作用:

日志存储和检索:

业务日志->kafka->spark清洗->ES->Kibana展示。

9.es查看分片:

curl http://esip:9200/_cat/shards?v

10.查看索引的分片详情:

curl http://esip:9200/_cat/allocation?v

祁连山

鼓励的话语: 雪花本是天上客,只因多情下凡尘。唯有雪花知我意,已把相思写满天!