0


ES常用curl命令

ES常用curl命令

常用命令

//1.查询查看分片状态-Authorization方式(postman通过账密获取token)
curl -XGET ‘http://127.16.11.83:9200/_cluster/allocation/explain?pretty’ --header ‘Authorization’: Basic ZWxhc3RpYzphcDIwcE9QUzIw’

//2.查询查看分片状态-账密方式
curl -XGET -u username “http://127.16.11.83:9200/_cluster/allocation/explain?pretty” -H ‘Content-Type:application/json’

//3.查询集群状态命令
curl -XGET -u username “http://127.16.11.83:9200/_cluster/health?pretty”

//4.查询Es全局状态
curl -XGET -u username “http://127.16.11.83:9200/_cluster/stats?pretty”

//5.查询集群设置
curl -XGET -u username “http://127.16.11.83:9200/_cluster/settings?pretty”

//6.查询集群文档总数
curl -XGET -u username “http://127.16.11.83:9200/_cat/count?v”

//7.查看当前集群索引分片信息
curl -XGET -u username “http://127.16.11.83:9200/_cat/shards?v”

//8.查看集群实例存储详细信息
curl -XGET -u username “http://127.16.11.83:9200/_cat/allocation?v”

//9.查看当前集群的所有实例
curl -XGET -u username “http://127.16.11.83:9200/_cat/nodes?v”

//10.查看当前集群等待任务
curl -XGET -u username “http://127.16.11.83:9200/_cat/pending_tasks?v”

//11.查看集群查询线程池任务
curl -XGET -u username “http://127.16.11.83:9200/_cat/thread_pool/search?v”

//12.查看集群写入线程池任务
curl -XGET -u username “http://127.16.11.83:9200/_cat/thread_pool/bulk?v”

//13.清理ES所有缓存
curl -XPOST “http://127.16.11.83:9200/_cache/clear”

//14.查询索引信息
curl -XGET -u : ‘https://127.16.11.83:9200/licence_info_test?pretty’

//15.关闭索引
curl -XGET -u : ‘https://127.16.11.83:9200/my_index/_close?pretty’

//16.打开索引
curl -XGET -u : ‘https://127.16.11.83:9200/my_index/_open?pretty’

利用postman通过账号密码获取token

在这里插入图片描述

在这里插入图片描述


本文转载自: https://blog.csdn.net/weixin_42925623/article/details/125502096
版权归原作者 通道已损坏 所有, 如有侵权,请联系我们删除。

“ES常用curl命令”的评论:

还没有评论