CURL查询ES相关

CURL查询ES相关

1. _cat
root@RealEyeWebITS:~# curl localhost:9200/_cat
=^.^=
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_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/plugins
/_cat/fielddata
/_cat/fielddata/{fields}
2. v

详细信息

root@RealEyeWebITS:~# curl localhost:9200/_cat/master?v
id                     host          ip        node
JleE2XaQStGn4z6xUS8QEw RealEyeWebITS 127.0.1.1 Phantom Blonde
3. help

帮助指令

root@RealEyeWebITS:~# curl localhost:9200/_cat/master?help
id   |   | node id
host | h | host name
ip   |   | ip address
node | n | node name
4. h

指定输出的字段:

root@RealEyeWebITS:~# curl localhost:9200/_cat/master?v
id                     host          ip        node
JleE2XaQStGn4z6xUS8QEw RealEyeWebITS 127.0.1.1 Phantom Blonde
root@RealEyeWebITS:~# curl localhost:9200/_cat/master?h=host,ip,node
RealEyeWebITS 127.0.1.1 Phantom Blonde
5. 数字类型的格式化
root@RealEyeWebITS:~# curl localhost:9200/_cat/indices?v
health index                   pri rep docs.count docs.deleted store.size pri.store.size 
green  indices                   1   0          0            0       115b           115b 
green  alertinfo-2021.01.29      1   0       3820            2     10.1mb         10.1mb 
green  data_wness                1   0     130103          215    185.5mb        185.5mb
......
......
......
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
未填写
文章
1
粉丝
0
喜欢
0
收藏
0
排名:2432
访问:17
私信
所有博文