ELK接口调用
一、查询 1、查看ES集群健康值 curl http://<ES_IP>:9200/_cluster/health?pretty 2、查看每个索引的状态 curl -XGET "http://<ES_IP>:9200/_cat/indices?v" 3、查看某个索引的status curl -s http://<ES_IP>:9200/_cat/indices/IndexName?h=status 4、查看状态red的索引 curl -XGET http://<ES_IP>:9200/_cat/indices |awk '$1 ~/red/' 5、查询索引库的settings信息 curl -XGET http://<ES_IP>:9200/<index_name>/settings?pretty?pretty=true 6、查询索引别名 查询所有别名信息: curl -XGET http://<ES_IP>:9200/_cat/aliases?v 查询某个索引下的别名信息: curl -XGET http://<ES_IP>:9200/<index_name>/_alias/* 二、修改 1、关闭不需要的索引,减少内存占用 curl -XPOST "http://<ES_IP>:9200/<index_name>/_close" 2、操作索引 操作不存在索引: curl