|
|
|
@ -1,9 +1,13 @@
|
|
|
|
|
## 全局变量
|
|
|
|
|
# 说明:ES是通过提供WEBAPI的方式进行交互的。
|
|
|
|
|
# url参数v是显示更多(标题);对于json结果,参数pretty是人类友好json(未压缩便于阅读)
|
|
|
|
|
# 全局变量
|
|
|
|
|
//ES服务管理WebApi地址
|
|
|
|
|
@baseUrl = https://127.0.0.1:9201
|
|
|
|
|
|
|
|
|
|
//帐号认证信息:除了用户名:密码形式外,也可使用使用其它base64字符串
|
|
|
|
|
@accounts = elastic:es-461400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 请求ES首页
|
|
|
|
|
GET {{baseUrl}}?pretty
|
|
|
|
|
Content-Type: application/json
|
|
|
|
@ -18,3 +22,51 @@ Authorization: Basic {{accounts}}
|
|
|
|
|
GET {{baseUrl}}/_cat/health?v
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
# 集群故障诊断,主要有到_cat和_cluster
|
|
|
|
|
### 集群中的节点
|
|
|
|
|
GET {{baseUrl}}/_cat/nodes?v
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 节点属性
|
|
|
|
|
GET {{baseUrl}}/_cat/nodeattrs?v
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 健康状态
|
|
|
|
|
GET {{baseUrl}}/_cat/health?v
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 所有索引
|
|
|
|
|
GET {{baseUrl}}/_cat/indices?v
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 指定状态索引
|
|
|
|
|
GET {{baseUrl}}/_cat/indices?health=green&v=true
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 分片
|
|
|
|
|
GET {{baseUrl}}/_cat/shards?v
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 检查集群状态
|
|
|
|
|
GET {{baseUrl}}/_cluster/health?pretty
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
### 诊断分片:没有异常分片时会报错
|
|
|
|
|
GET {{baseUrl}}/_cluster/allocation/explain
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 搜索
|
|
|
|
|
GET {{baseUrl}}/_search?pretty
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
Authorization: Basic {{accounts}}
|
|
|
|
|
|
|
|
|
|