Skip to content

Commit 874ec39

Browse files
committed
add nodes_feature_usage.md
1 parent c63ce41 commit 874ec39

File tree

4 files changed

+101
-7
lines changed

4 files changed

+101
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
后续计划如下:
1010

1111
1. 继续翻译 8.x 版本的文档内容
12-
1. 完成后,将已完成内容将放到**历史**目录下
13-
1. 翻译官方 9.x 版本文档内容作为主要内容
12+
2. 完成后,将已完成内容将放到**历史**目录下
13+
3. 翻译官方 9.x 版本文档内容作为主要内容
1414

1515
## 目录
1616

@@ -27,7 +27,7 @@
2727

2828
从官方 7.11 文档开始,翻译为中文,并发布在网站。
2929

30-
由于官方版本更新比较快(当前为 **8.16**),文档虽然是基于 7.11 开始翻译,但实际翻译时,都是翻译当前的最新版本文档。
30+
由于官方版本更新比较快(当前为 **8.18**),文档虽然是基于 7.11 开始翻译,但实际翻译时,都是翻译当前的最新版本文档。
3131

3232
### 计划
3333

@@ -902,7 +902,7 @@ npm run docs:dev
902902
- :heavy_check_mark: 集群状态 API [:link:](https://elasticsearch.bookhub.techrest_apis/cluster_apis/cluster_state)
903903
- :heavy_check_mark: 集群统计 API [:link:](https://elasticsearch.bookhub.techrest_apis/cluster_apis/cluster_stats)
904904
- :heavy_check_mark: 集群更新设置 API [:link:](https://elasticsearch.bookhub.techrest_apis/cluster_apis/cluster_update_settings)
905-
- Nodes feature usage
905+
- :heavy_check_mark: 节点功能使用情况 API [:link:](https://elasticsearch.bookhub.techrest_apis/cluster_apis/nodes_feature_usage)
906906
- Nodes hot threads
907907
- Nodes info
908908
- Nodes reload secure settings

docs/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ slug: /
1212
- 2024.03.29 增加搜索功能
1313
- 2023.11.08 变更文档框架为 Docusaurus
1414

15-
从官方版本 7.11 文档开始,当前版本为 8.13。由于官方版本更新比较快,文档虽然是基于 7.11 开始翻译,,实际翻译过程中,后续的文档都是翻译当前的最新版本。
15+
从官方版本 7.11 文档开始,当前版本为 8.18。由于官方版本更新比较快,文档虽然是基于 7.11 开始翻译,,实际翻译过程中,后续的文档都是翻译当前的最新版本。
1616

1717
## 注意 ❗
1818

@@ -21,8 +21,8 @@ slug: /
2121
后续计划如下:
2222

2323
1. 继续翻译 8.x 版本的文档内容
24-
1. 完成后,将已完成内容将放到**历史**目录下
25-
1. 翻译官方 9.x 版本文档内容作为主要内容
24+
2. 完成后,将已完成内容将放到**历史**目录下
25+
3. 翻译官方 9.x 版本文档内容作为主要内容
2626

2727
## 微信公众号
2828

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# 节点功能使用情况 API
2+
3+
返回功能使用情况的信息。
4+
5+
:::info 新 API 参考
6+
有关最新的 API 详细信息,请参阅[集群 API](https://www.elastic.co/docs/api/doc/elasticsearch/v8/group/endpoint-cluster)
7+
:::
8+
9+
## 请求
10+
11+
```bash
12+
GET /_nodes/usage
13+
```
14+
15+
```bash
16+
GET /_nodes/<node_id>/usage
17+
```
18+
19+
```bash
20+
GET /_nodes/usage/<metric>
21+
```
22+
23+
```bash
24+
GET /_nodes/<node_id>/usage/<metric>
25+
```
26+
27+
## 先决条件
28+
29+
- 如果启用了 Elasticsearch 安全功能,您必须拥有 `monitor``manage` [集群权限](/secure_the_elastic_statck/user_authorization/security_privileges#集群权限)才能使用此 API。
30+
31+
## 描述
32+
33+
集群节点使用情况 API 允许您检索每个节点功能使用情况的信息。所有节点选择选项的说明请参见[此处](/rest_apis/cluster_apis)
34+
35+
## 路径参数
36+
37+
- `<metric>`
38+
(可选,字符串)限制返回的信息为特定指标。逗号分隔的以下选项列表:
39+
40+
- `_all`
41+
返回所有统计信息。
42+
- `rest_actions`
43+
返回 REST 动作类名及该动作在节点上被调用的次数。
44+
45+
- `<node_id>`
46+
(可选,字符串)用于限制返回信息的节点 ID 或名称的逗号分隔列表。
47+
48+
## 查询参数
49+
50+
- `timeout`
51+
52+
(可选,[时间单位](/rest_apis/api_convention/common_options.html#时间单位))等待每个节点响应的时长。如果节点在超时到期前未响应,则响应中不包含其信息。但超时的节点会包含在响应的 `_nodes.failed` 属性中。默认为无超时。
53+
54+
## 示例
55+
56+
REST 动作示例:
57+
58+
```bash
59+
GET _nodes/usage
60+
```
61+
62+
API 返回以下响应:
63+
64+
```json
65+
{
66+
"_nodes": {
67+
"total": 1,
68+
"successful": 1,
69+
"failed": 0
70+
},
71+
"cluster_name": "my_cluster",
72+
"nodes": {
73+
"pQHNt5rXTTWNvUgOrdynKg": {
74+
"timestamp": 1492553961812,
75+
"since": 1492553906606,
76+
"rest_actions": {
77+
"nodes_usage_action": 1,
78+
"create_index_action": 1,
79+
"document_get_action": 1,
80+
"search_action": 19,
81+
"nodes_info_action": 36
82+
},
83+
"aggregations": { ... }
84+
}
85+
}
86+
}
87+
```
88+
89+
- 1. `"timestamp": 1492553961812`:执行此节点使用情况请求的时间戳。
90+
- 2. `"since": 1492553906606`:开始记录使用情况信息的时间戳。这相当于节点启动的时间。
91+
- 3. `"since": 1492553906606`:此节点的搜索动作已被调用 19 次。
92+
93+
> [原文链接](https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-usage.html)

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ const sidebars = {
179179
"rest_apis/cluster_apis/cluster_state",
180180
"rest_apis/cluster_apis/cluster_stats",
181181
"rest_apis/cluster_apis/cluster_update_settings",
182+
"rest_apis/cluster_apis/nodes_feature_usage",
182183
],
183184
},
184185
{

0 commit comments

Comments
 (0)