This is an automated email from the ASF dual-hosted git repository.

neoyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b6f7db  HDDS-4516. [Doc] Add zh translation to Recon Architecture 
(#1633)
1b6f7db is described below

commit 1b6f7dbed61a9e70969b6682707ce19e99c459bb
Author: sky76093016 <[email protected]>
AuthorDate: Thu Dec 17 13:26:49 2020 +0800

    HDDS-4516. [Doc] Add zh translation to Recon Architecture (#1633)
---
 .../docs/content/concept/OzoneManager.zh.md        |   4 +-
 hadoop-hdds/docs/content/concept/Recon.zh.md       | 116 +++++
 .../content/concept/StorageContainerManager.zh.md  |   6 +-
 hadoop-hdds/docs/content/feature/Recon.zh.md       |  23 +-
 hadoop-hdds/docs/content/interface/ReconApi.zh.md  | 502 +++++++++++++++++++++
 5 files changed, 627 insertions(+), 24 deletions(-)

diff --git a/hadoop-hdds/docs/content/concept/OzoneManager.zh.md 
b/hadoop-hdds/docs/content/concept/OzoneManager.zh.md
index 3fc7fbf..2767805 100644
--- a/hadoop-hdds/docs/content/concept/OzoneManager.zh.md
+++ b/hadoop-hdds/docs/content/concept/OzoneManager.zh.md
@@ -77,6 +77,8 @@ Ozone Manager 使用 Apache Ratis(一种 Raft 协议的开源实现)来复
 
 为了详细地了解 Ozone Manager ,本节针对它所提供的网络服务和持久化状态提供一个快速概述。
 
+### Ozone Manager 提供的网络服务
+
 Ozone 为客户端和管理命令提供网络服务,主要的服务如下:
 
  * 键、桶、卷 / 增删改查
@@ -93,7 +95,7 @@ Ozone 为客户端和管理命令提供网络服务,主要的服务如下:
    * ServiceList(用于服务发现)
    * DBUpdates(用于 [Recon]({{< ref path="feature/Recon.md" lang="en" >}}) 下载快照)
  
- **持久化状态**
+### 持久化状态
 
 以下数据将保存在 Ozone Manager 端的指定 RocksDB 目录中:
 
diff --git a/hadoop-hdds/docs/content/concept/Recon.zh.md 
b/hadoop-hdds/docs/content/concept/Recon.zh.md
new file mode 100644
index 0000000..5c67351
--- /dev/null
+++ b/hadoop-hdds/docs/content/concept/Recon.zh.md
@@ -0,0 +1,116 @@
+---
+title: "Recon"
+date: "2020-10-27"
+weight: 8
+menu: 
+  main:
+     parent: 概念
+summary: Recon 作为 Ozone 的管理和监视控制台。
+---
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+Recon 充当 Ozone 的管理和监视控制台。它提供了 Ozone 的鸟瞰图,并通过基于 REST 的 API 和丰富的网页用户界面(Web 
UI)展示了集群的当前状态,从而帮助用户解决任何问题。
+
+
+## 高层次设计
+
+{{<figure src="/concept/ReconHighLevelDesign.png" width="800px">}}
+
+<br/>
+
+在较高的层次上,Recon 收集和汇总来自 Ozone Manager(OM)、Storage Container 
Manager(SCM)和数据节点(DN)的元数据,并充当中央管理和监视控制台。Ozone 管理员可以使用 Recon 查询系统的当前状态,而不会使 OM  
或 SCM 过载。
+
+Recon 维护多个数据库,以支持批处理,更快的查询和持久化聚合信息。它维护 OM DB 和 SCM DB 的本地副本,以及用于持久存储聚合信息的 SQL 
数据库。
+
+Recon 还与 Prometheus 集成,提供一个 HTTP 端点来查询 Prometheus 的 Ozone 指标,并在网页用户界面(Web 
UI)中显示一些关键时间点的指标。
+
+## Recon 和 Ozone Manager
+
+{{<figure src="/concept/ReconOmDesign.png" width="800px">}}
+
+<br/>
+
+Recon 最初从领导者 OM 的 HTTP 端点获取 OM rocks DB 的完整快照,解压缩文件并初始化 RocksDB 
以进行本地查询。通过对最后一个应用的序列 ID 的 RPC 调用,定期请求领导者 OM 
进行增量更新,从而使数据库保持同步。如果由于某种原因而无法检索增量更新或将其应用于本地数据库,则会再次请求一个完整快照以使本地数据库与 OM DB 
保持同步。因此,Recon 可能会显示陈旧的信息,因为本地数据库不会总是同步的。
+
+## Recon 和 Storage Container Manager
+
+{{<figure src="/concept/ReconScmDesign.png" width="800px">}}
+
+<br/>
+
+Recon 还充当数据节点的被动 SCM。在集群中配置 Recon 时,所有数据节点都向 Recon 注册,并像 SCM 一样向 Recon 
发送心跳、容器报告、增量容器报告等。Recon 使用它从数据节点得到的所有信息在本地构建自己的 SCM rocks DB 副本。Recon 
从不向数据节点发送任何命令作为响应,而只是充当被动 SCM 以更快地查找 SCM 元数据。
+
+## <a name="task-framework"></a> 任务框架
+
+Recon 有其自己的任务框架,可对从 OM 和 SCM 获得的数据进行批处理。一个任务可以在 OM DB 或 SCM DB 
上监听和操作数据库事件,如`PUT`、`DELETE`、`UPDATE`等。在此基础上,任务实现`org.apache.hadoop.ozone.recon.tasks.ReconOmTask`或者扩展`org.apache.hadoop.ozone.recon.scm.ReconScmTask`。
+
+`ReconOmTask`的一个示例是`ContainerKeyMapperTask`,它在 RocksDB 中持久化保留了容器 -> 
键映射。当容器被报告丢失或处于不健康的运行状态时,这有助于了解哪些键是容器的一部分。另一个示例是`FileSizeCountTask`,它跟踪 SQL 
数据库中给定文件大小范围内的文件计数。这些任务有两种情况的实现:
+ 
+ - 完整快照(reprocess())
+ - 增量更新(process())
+ 
+当从领导者 OM 获得 OM DB 的完整快照时,将对所有注册的 OM 任务调用 reprocess()。在随后的增量更新中,将在这些 OM 任务上调用 
process()。
+
+`ReconScmTask`的示例是`ContainerHealthTask`,它以可配置的时间间隔运行,扫描所有容器的列表,并将不健康容器的状态(`MISSING`、`MIS_REPLICATED`、`UNDER_REPLICATED`、`OVER_REPLICATED`)持久化保留在
 SQL 表中。此信息用于确定集群中是否有丢失的容器。
+
+## Recon 和 Prometheus
+
+Recon 可以与任何配置为收集指标的 Prometheus 实例集成,并且可以在数据节点和 Pipelines 页面的 Recon UI 
中显示有用的信息。Recon 还公开了一个代理端点 ([/指标]({{< ref 
path="interface/ReconApi.zh.md#metrics" >}})) 来查询 
Prometheus。可以通过将此配置`ozone.recon.prometheus.http.endpoint`设置为 Prometheus 
端点如`ozone.recon.prometheus.http.endpoint=localhost:9090`来启用此集成。
+
+## API 参考
+
+[链接到完整的 API 参考]({{< ref path="interface/ReconApi.zh.md" >}})
+   
+## 持久化状态
+
+ * [OM database]({{< ref "concept/OzoneManager.zh.md#持久化状态" >}})的本地副本
+ * [SCM database]({{< ref "concept/StorageContainerManager.zh.md#持久化状态" 
>}})的本地副本
+ * 以下数据在 Recon 中持久化在指定的 RocksDB 目录下: 
+     * ContainerKey 表
+         * 存储映射(容器,键) -> 计数
+     * ContainerKeyCount 表
+         * 存储容器 ID  -> 容器内的键数
+ * 以下数据存储在已配置的 SQL 数据库中(默认为 Derby ):
+     * GlobalStats 表
+         * 一个键 -> Value table 用于存储集群中出现的卷/桶/键的总数等聚合信息
+     * FileCountBySize 表
+         * 跟踪集群中文件大小范围内的文件数量
+     * ReconTaskStatus 表
+         * 跟踪在[Recon 任务框架](#task-framework)中已注册的 OM 和 SCM DB 任务的状态和最后运行时间戳
+     * ContainerHistory 表
+         * 存储容器副本 -> 具有最新已知时间戳记的数据节点映射。当一个容器被报告丢失时,它被用来确定最后已知的数据节点。
+     * UnhealthyContainers 表
+         * 
随时跟踪集群中所有不健康的容器(MISSING、UNDER_REPLICATED、OVER_REPLICATED、MIS_REPLICATED)
+
+
+## 需要关注的配置项
+
+配置项 |默认值 | <div style="width:300px;">描述</div>
+----|---------|------------
+ozone.recon.http-address | 0.0.0.0:9888 | Recon web UI 监听的地址和基本端口。
+ozone.recon.address | 0.0.0.0:9891 | Recon 的 RPC 地址。
+ozone.recon.db.dir | none | Recon Server 存储其元数据的目录。
+ozone.recon.om.db.dir | none | Recon Server 存储其 OM 快照 DB 的目录。
+ozone.recon.om.snapshot<br>.task.interval.delay | 10m | Recon 以分钟间隔请求 OM DB 快照。
+ozone.recon.task<br>.missingcontainer.interval | 300s | 定期检查集群中不健康容器的时间间隔。
+ozone.recon.sql.db.jooq.dialect | DERBY | 请参考 [SQL 
方言](https://www.jooq.org/javadoc/latest/org.jooq/org/jooq/SQLDialect.html) 
来指定不同的方言。
+ozone.recon.sql.db.jdbc.url | 
jdbc:derby:${ozone.recon.db.dir}<br>/ozone_recon_derby.db | Recon SQL database 
的 jdbc url。
+ozone.recon.sql.db.username | none | Recon SQL数据库的用户名。
+ozone.recon.sql.db.password | none | Recon SQL数据库的密码。
+ozone.recon.sql.db.driver | org.apache.derby.jdbc<br>.EmbeddedDriver | Recon 
SQL数据库的 jdbc driver。
+
diff --git a/hadoop-hdds/docs/content/concept/StorageContainerManager.zh.md 
b/hadoop-hdds/docs/content/concept/StorageContainerManager.zh.md
index 1c63f1b..7adecde 100644
--- a/hadoop-hdds/docs/content/concept/StorageContainerManager.zh.md
+++ b/hadoop-hdds/docs/content/concept/StorageContainerManager.zh.md
@@ -44,7 +44,7 @@ SCM 负责创建 Ozone 集群。当通过 `init` 命令启动 SCM 时,SCM 将
 
 针对 Storage Container Manager 的详细视图,本节提供有关网络服务和持久化数据的快速概述。
 
-**Storage Container Manager 提供的网络服务:**
+### Storage Container Manager 提供的网络服务:
 
  * 管道: 列出/删除/激活/停用
     * 管道是形成一组复制组的数据节点
@@ -62,7 +62,7 @@ SCM 负责创建 Ozone 集群。当通过 `init` 命令启动 SCM 时,SCM 将
    
  注意:客户端不能直接连接 SCM 。
  
-**持久化状态**
+### 持久化状态
  
  以下数据持久化在 Storage Container Manager 端的指定 RocksDB 目录中
  
@@ -83,4 +83,4 @@ ozone.scm.container.size | 5GB | Ozone 使用的默认容器的大小
 ozone.scm.block.size | 256MB |  数据块的默认大小
 hdds.scm.safemode.min.datanode | 1 | 能够启动实际工作所需的最小数据节点数
 ozone.scm.http-address | 0.0.0.0:9876 | SCM 服务端使用的 HTTP 地址
-ozone.metadata.dirs | none | 存储持久化数据的目录(RocksDB)
\ No newline at end of file
+ozone.metadata.dirs | none | 存储持久化数据的目录(RocksDB)
diff --git a/hadoop-hdds/docs/content/feature/Recon.zh.md 
b/hadoop-hdds/docs/content/feature/Recon.zh.md
index 5a41620..b7d04a7 100644
--- a/hadoop-hdds/docs/content/feature/Recon.zh.md
+++ b/hadoop-hdds/docs/content/feature/Recon.zh.md
@@ -1,5 +1,5 @@
 ---
-title: "Recon"
+title: "Recon 服务器"
 weight: 7
 menu:
    main:
@@ -23,27 +23,10 @@ summary: Recon 是 Ozone 中用于分析服务的网页用户界面(Web UI)
   limitations under the License.
 -->
 
-Recon 是 Ozone 中用于分析服务的网页用户界面(Web UI)。它是一个可选组件,但强烈建议您使用,因为它可以增加可视性。
+Recon 作为 Ozone 的管理和监听控制台。它是一个可选组件,但强烈建议将其添加到集群中,因为 Recon 
可以在关键时刻帮助您对集群进行故障排除。请参阅 [Recon 架构]({{< ref "concept/Recon.zh.md" >}}) 
以获得详细的架构概述和 [Recon API]({{< ref path="interface/ReconApi.zh.md" >}}) 文档,以获得 
HTTP API 参考。
 
-Recon 从 Ozone 集群中**收集**所有数据,并将其存储在 SQL数据库中,以便进一步分析。
-
- 1. Ozone Manager 的数据是通过异步过程在后台下载的。OM 会定期创建 RocksDB 快照,并将增量数据复制到 Recon 进行处理。
-
- 2. 数据节点不仅可以将心跳发送到 SCM,也能发送到 Recon。Recon 
可以成为心跳的唯读(Read-only)监听器,并根据收到的信息更新本地数据库。
-
-当 Recon 配置完成时,我们便可以启动服务。
+Recon 是一个自带 HTTP 网页服务器的服务,可以通过以下命令启动。
 
 {{< highlight bash >}}
 ozone --daemon start recon
 {{< /highlight >}}
-
-## 需要关注的配置项
-
-配置项 | 默认值 | 描述
--------|--------|-----
-ozone.recon.http-address | 0.0.0.0:9888 | Recon web UI 监听的地址和基本端口。
-ozone.recon.address | 0.0.0.0:9891 | Recon 的 RPC 地址。
-ozone.recon.db.dir | none | Recon Server 存储其元数据的目录。
-ozone.recon.om.db.dir | none | Recon Server 存储其 OM 快照 DB 的目录。
-ozone.recon.om.snapshot.task.interval.delay | 10m | Recon 以分钟间隔请求 OM DB 快照。
-
diff --git a/hadoop-hdds/docs/content/interface/ReconApi.zh.md 
b/hadoop-hdds/docs/content/interface/ReconApi.zh.md
new file mode 100644
index 0000000..a134fd4
--- /dev/null
+++ b/hadoop-hdds/docs/content/interface/ReconApi.zh.md
@@ -0,0 +1,502 @@
+---
+title: Recon API
+weight: 4
+menu:
+   main:
+      parent: "编程接口"
+summary: Recon 服务器支持 HTTP 端点,以帮助故障排除和监听 Ozone 集群。
+---
+
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+Recon API v1 是一组 HTTP 端点,可以帮助您了解 Ozone 集群的当前状态,并在需要时进行故障排除。
+
+### HTTP 端点
+
+#### 容器
+
+* **/containers**
+
+    **URL 结构**
+    ```
+    GET /api/v1/containers
+    ```
+
+    **参数**
+
+    * prevKey (可选)
+    
+        只回传ID大于给定的 prevKey 的容器。
+        示例:prevKey=1
+
+    * limit (可选)
+    
+        只回传有限数量的结果。默认限制是1000。
+    
+    **回传**
+    
+    回传所有 ContainerMetadata 对象。
+    
+    ```json
+    {
+      "data": {
+        "totalCount": 3,
+        "containers": [
+          {
+            "ContainerID": 1,
+            "NumberOfKeys": 834
+          },
+          {
+            "ContainerID": 2,
+            "NumberOfKeys": 833
+          },
+          {
+            "ContainerID": 3,
+            "NumberOfKeys": 833
+          }
+        ]
+      }
+    }
+    ```
+
+* **/containers/:id/keys**
+
+    **URL 结构**
+    ```
+    GET /api/v1/containers/:id/keys
+    ```
+    
+    **参数**
+    
+    * prevKey (可选)
+     
+        只回传在给定的 prevKey 键前缀之后的键。
+        示例:prevKey=/vol1/bucket1/key1
+        
+    * limit (可选)
+    
+        只回传有限数量的结果。默认限制是1000。
+        
+    **回传**
+    
+    回传给定容器 ID 的所有 KeyMetadata 对象。
+    
+    ```json
+    {
+      "totalCount":7,
+      "keys": [
+        {
+          "Volume":"vol-1-73141",
+          "Bucket":"bucket-3-35816",
+          "Key":"key-0-43637",
+          "DataSize":1000,
+          "Versions":[0],
+          "Blocks": {
+            "0": [
+              {
+                "containerID":1,
+                "localID":105232659753992201
+              }
+            ]
+          },
+          "CreationTime":"2020-11-18T18:09:17.722Z",
+          "ModificationTime":"2020-11-18T18:09:30.405Z"
+        },
+        ...
+      ]
+    }
+    ```
+* **/containers/missing**
+    
+    **URL 结构**
+    ```
+    GET /api/v1/containers/missing
+    ```
+    
+    **参数**
+    
+    没有参数。
+    
+    **回传**
+    
+    回传所有丢失容器的 MissingContainerMetadata 对象。
+    
+    ```json
+    {
+       "totalCount": 26,
+       "containers": [{
+               "containerID": 1,
+               "missingSince": 1605731029145,
+               "keys": 7,
+               "pipelineID": "88646d32-a1aa-4e1a",
+               "replicas": [{
+                       "containerId": 1,
+                       "datanodeHost": "localhost-1",
+                       "firstReportTimestamp": 1605724047057,
+                       "lastReportTimestamp": 1605731201301
+               }, 
+            ...
+            ]
+       },
+        ...
+        ]
+    }
+    ```
+* **/containers/:id/replicaHistory**
+
+    **URL 结构**
+    ```
+    GET /api/v1/containers/:id/replicaHistory
+    ```
+    
+    **参数**
+    
+    没有参数。
+    
+    **回传**
+
+    回传给定容器 ID 的所有 ContainerHistory 对象。
+    
+    ```json
+    [
+      {
+        "containerId": 1,
+        "datanodeHost": "localhost-1",
+        "firstReportTimestamp": 1605724047057,
+        "lastReportTimestamp": 1605730421294
+      },
+      ...
+    ]
+    ```
+* **/containers/unhealthy**
+
+    **URL 结构**
+     ```
+     GET /api/v1/containers/unhealthy
+     ```
+     
+    **参数**
+    
+    * batchNum (可选)
+
+        回传结果的批号(如“页码”)。
+        传递1,将回传记录1到limit。传递2,将回传limit + 1到2 * limit,依此类推。
+        
+    * limit (可选)
+    
+        只回传有限数量的结果。默认限制是1000。
+        
+    **回传**
+    
+    回传所有不健康容器的 UnhealthyContainerMetadata 对象。
+    
+     ```json
+     {
+       "missingCount": 2,
+       "underReplicatedCount": 0,
+       "overReplicatedCount": 0,
+       "misReplicatedCount": 0,
+       "containers": [{
+               "containerID": 1,
+               "containerState": "MISSING",
+               "unhealthySince": 1605731029145,
+               "expectedReplicaCount": 3,
+               "actualReplicaCount": 0,
+               "replicaDeltaCount": 3,
+               "reason": null,
+               "keys": 7,
+               "pipelineID": "88646d32-a1aa-4e1a",
+               "replicas": [{
+                       "containerId": 1,
+                       "datanodeHost": "localhost-1",
+                       "firstReportTimestamp": 1605722960125,
+                       "lastReportTimestamp": 1605731230509
+               }, 
+            ...
+            ]
+       },
+        ...
+        ]
+     } 
+     ```
+     
+* **/containers/unhealthy/:state**
+
+    **URL 结构**
+    ```
+    GET /api/v1/containers/unhealthy/:state
+    ```
+     
+    **参数**
+    
+    * batchNum (可选)
+    
+        回传结果的批号(如“页码”)。
+        传递1,将回传记录1到limit。传递2,将回传limit + 1到2 * limit,依此类推。
+        
+    * limit (可选)
+    
+        只回传有限数量的结果。默认限制是1000。
+        
+    **回传**
+    
+    回传处于给定状态的容器的 UnhealthyContainerMetadata 对象。
+    不健康的容器状态可能为`MISSING`, `MIS_REPLICATED`, `UNDER_REPLICATED`, 
`OVER_REPLICATED`。
+    响应结构与`/containers/unhealthy`相同。
+    
+#### 集群状态
+
+* **/clusterState**
+
+    **URL 结构**
+    ```
+    GET /api/v1/clusterState
+    ```
+     
+    **参数**
+    
+    没有参数。
+    
+    **回传**
+    
+    返回 Ozone 集群当前状态的摘要。
+    
+     ```json
+     {
+       "pipelines": 5,
+       "totalDatanodes": 4,
+       "healthyDatanodes": 4,
+       "storageReport": {
+               "capacity": 1081719668736,
+               "used": 1309212672,
+               "remaining": 597361258496
+       },
+       "containers": 26,
+       "volumes": 6,
+       "buckets": 26,
+       "keys": 25
+     }
+     ```
+     
+#### 数据节点
+
+* **/datanodes**
+
+    **URL 结构**
+    ```
+    GET /api/v1/datanodes
+    ```
+    
+    **参数**
+    
+    没有参数。
+    
+    **回传**
+    
+    回传集群中的所有数据节点。
+    
+    ```json
+    {
+       "totalCount": 4,
+       "datanodes": [{
+               "uuid": "f8f8cb45-3ab2-4123",
+               "hostname": "localhost-1",
+               "state": "HEALTHY",
+               "lastHeartbeat": 1605738400544,
+               "storageReport": {
+                       "capacity": 270429917184,
+                       "used": 358805504,
+                       "remaining": 119648149504
+               },
+               "pipelines": [{
+                       "pipelineID": "b9415b20-b9bd-4225",
+                       "replicationType": "RATIS",
+                       "replicationFactor": 3,
+                       "leaderNode": "localhost-2"
+               }, {
+                       "pipelineID": "3bf4a9e9-69cc-4d20",
+                       "replicationType": "RATIS",
+                       "replicationFactor": 1,
+                       "leaderNode": "localhost-1"
+               }],
+               "containers": 17,
+               "leaderCount": 1
+       },
+        ...
+        ]
+     }
+     ```
+     
+#### 管道
+
+* **/pipelines**
+
+    **URL 结构**
+    ```
+    GET /api/v1/pipelines
+    ```
+    **参数**
+    
+    没有参数
+    
+    **回传**
+    
+    回传在集群中的所有管道。
+    
+    ```json
+     {
+       "totalCount": 5,
+       "pipelines": [{
+               "pipelineId": "b9415b20-b9bd-4225",
+               "status": "OPEN",
+               "leaderNode": "localhost-1",
+               "datanodes": ["localhost-1", "localhost-2", "localhost-3"],
+               "lastLeaderElection": 0,
+               "duration": 23166128,
+               "leaderElections": 0,
+               "replicationType": "RATIS",
+               "replicationFactor": 3,
+               "containers": 0
+       },
+        ...
+        ]
+     }
+     ```  
+
+#### 任务
+
+* **/task/status**
+
+    **URL 结构**
+    ```
+    GET /api/v1/task/status
+    ```
+    
+    **参数**
+    
+    没有参数
+    
+    **回传**
+    
+    回传所有 Recon 任务的状态。
+  
+    ```json
+     [
+       {
+       "taskName": "OmDeltaRequest",
+       "lastUpdatedTimestamp": 1605724099147,
+       "lastUpdatedSeqNumber": 186
+       },
+       ...
+     ]
+    ```
+    
+#### 使用率
+
+* **/utilization/fileCount**
+
+    **URL 结构**
+    ```
+    GET /api/v1/utilization/fileCount
+    ```
+    
+    **参数**
+    
+    * volume (可选)
+    
+        根据给定的卷名过滤结果。
+        
+    * bucket (可选)
+    
+        根据给定的桶名过滤结果。
+        
+    * fileSize (可选)
+
+        根据给定的文件大小筛选结果。
+        
+    **回传**
+    
+    回传不同文件范围内的文件计数,其中响应对象中的`fileSize`是文件大小范围的上限。
+    
+    ```json
+     [{
+       "volume": "vol-2-04168",
+       "bucket": "bucket-0-11685",
+       "fileSize": 1024,
+       "count": 1
+     }, {
+       "volume": "vol-2-04168",
+       "bucket": "bucket-1-41795",
+       "fileSize": 1024,
+       "count": 1
+     }, {
+       "volume": "vol-2-04168",
+       "bucket": "bucket-2-93377",
+       "fileSize": 1024,
+       "count": 1
+     }, {
+       "volume": "vol-2-04168",
+       "bucket": "bucket-3-50336",
+       "fileSize": 1024,
+       "count": 2
+     }]
+    ```
+    
+#### <a name="metrics"></a> 指标
+
+* **/metrics/:api**
+
+    **URL 结构**
+    ```
+    GET /api/v1/metrics/:api
+    ```
+    
+    **参数**
+
+    请参阅 [Prometheus HTTP API 
参考](https://prometheus.io/docs/prometheus/latest/querying/api/) 以获取完整的查询文档。
+
+    **回传**
+
+    这是 Prometheus 的代理端点,并回传与 Prometheus 端点相同的响应。
+    示例:/api/v1/metrics/query?query=ratis_leader_election_electionCount
+    
+     ```json
+     {
+       "status": "success",
+       "data": {
+         "resultType": "vector",
+         "result": [
+           {
+             "metric": {
+               "__name__": "ratis_leader_election_electionCount",
+               "exported_instance": "33a5ac1d-8c65-4c74-a0b8-9314dfcccb42",
+               "group": "group-03CA9397D54B",
+               "instance": "ozone_datanode_1:9882",
+               "job": "ozone"
+             },
+             "value": [
+               1599159384.455,
+               "5"
+             ]
+           }
+         ]
+       }
+     }
+     ```
+
+


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to