命令:curl -XGET localhost:9200/_cat
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cat'
命令:curl -X GET “localhost:9200/_cat/healthv”
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cat/health'
GET _cat/indices?v&health=red
GET _cat/indices?v&health=yellow
GET _cat/indices?v&health=green
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cat/indices?v&health=green'
命令:curl -X GET ‘localhost:9200/_cat/nodesv’
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cat/nodes'
命令:curl -XGET ‘localhost:9200/_nodes/nodeNamepretty=true’
命令:curl -X GET “ip地址:9200/_cat/indicesv”
示例:curl -X GET localhost:9200/_cat/indicesv
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cat/indices'
过滤索引名称
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cat/indices' | grep 索引名称
命令:curl -XGET “http://localhost:9200/testpretty” 注意:test是索引名
curl -X GET 'http://账号:密码@127.0.0.1:9200/testpretty-2022.04.11'
删除单个索引。
curl -X DELETE 'http://账号:密码@127.0.0.1:9200/test-2022.06.14-00010'
删除成功后的返回值
{“acknowledged”:true}
GET _cluster/health?level=shards
curl -X GET 'http://账号:密码@127.0.0.1:9200/_cluster/health?level=shards'