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

在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值