ES集群状态、节点、索引等查看及根据字段、排序查询

ES集群基础:

1. 查看集群:

http://172.xxx.xxx.8:9200

2. 查看状态:

http://172.xxx.xxx.8:9200/_cat/health?v

3. 查看索引:

http://172.xxx.xxx.8:9200/_cat/indices?v

4. 查看节点:

http://172.xxx.xxx.8:9200/_cat/nodes?v

5. 查看磁盘空间:

http://172.xxx.xxx.8:9200/_cat/allocation?v

6. 查看节点的分配情况:

http://172.xxx.xxx.8:9200/_cat/shards

7. 找到某个节点id:

http://172.xxx.xxx.8:9200/_nodes/process

8. 查看索引结构:

http://172.xxx.xxx.8:9200/idx_tile

9. 查询索引数据:

http://172.xxx.xxx.8:9200/idx_point/_search

10. 查询所有数据,根据某个字段降序排序 post查询,body的参数如下

http://172.xxx.xxx.8:9200/idx_point/_search
{
  "query": {
    "match_all": {}
  },
  "sort": [
    {
      "seq": {
        "order": "desc"
      }
    }
  ]
}

11. 根据某个字段查询

http://172.xxx.xxx.8:9200/idx_point/_search
{
	"query":{
		"match_phrase":{
			"pid":"H2019001"
		}
	}
}

12. 根据某个字段查询结果,删除

http://172.xxx.xxx.8:9200/idx_point/_delete_by_query
{
	"query":{
		"match_phrase":{
			"pid":"H201900001"
		}
	}
}

13. 根据某个字段查询并只返回某一个字段

http://172.xxx.xxx.8:9200/idx_point/_search
{
    "query":{
        "match":{
           "pid":"1111124345511"
        }
    },
    "_source":"timestamp"
}

14. 修改settings某个字段

在kibana console中先查询,在更新

GET idx_cx_test/_settings
{
    "query":{
        "match_all":{}
    }
}
PUT idx_cx_test/_settings
{
   "max_result_window": 100000
}

15. Kibana console查询集群状态、节点、索引等

GET _cat/health?v
{
    "query":{
        "match_all":{}
    }
}
GET _cat/nodes?v
{
    "query":{
        "match_all":{}
    }
}
GET _cat/indices?v
{
    "query":{
        "match_all":{}
    }
}

16. Kibana console导出为curl请求

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序媛一枚~

您的鼓励是我创作的最大动力。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值