11---
22title : 使用 Prometheus 跟踪指标
33---
4+
45import StepsWrap from '@site/src /components/StepsWrap';
56import StepContent from '@site/src /components/Steps/step-content';
67
@@ -19,14 +20,14 @@ import StepContent from '@site/src/components/Steps/step-content';
1920
2021### 前提条件
2122
22- - 要开始跟踪指标,请确保为您的 Databend Cloud 租户启用了指标。要启用此功能,请在 Databend Cloud 中导航到 ** Support** > ** Create New Ticket** ,并请求为您的租户激活指标 。
23+ - 要开始跟踪指标,请确保为您的 Databend Cloud 租户启用了指标。要启用此功能,请在 Databend Cloud 中导航到 ** Support** > ** Create New Ticket** ,并提交支持工单请求为您的租户激活指标 。
2324
2425- 本过程说明如何使用 Docker 设置 Prometheus 实例。在继续之前,请确保您的机器上已安装 Docker Engine。
2526
2627</StepContent >
2728<StepContent number =" 2 " >
2829
29- ### 准备一个 SQL 用户
30+ ### 准备 SQL 用户
3031
3132在 Databend Cloud 中为 Prometheus 创建一个专用的 SQL 用户以访问指标。例如,您可以使用以下 SQL 语句创建一个名为 ` metrics ` 且密码为 ` metrics_password ` 的 SQL 用户:
3233
@@ -60,14 +61,14 @@ scrape_configs:
6061 region : <REGION>
6162` ` `
6263
63- | 占位符 | 描述 | 示例 |
64- |---------------------| -------------------------------------------| ----------------------------------------------------- |
65- | ` <USERNAME>` | SQL 用户的用户名。 | `metrics` |
66- | `<PASSWORD>` | SQL 用户的密码。 | `metrics_password` |
64+ | 占位符 | 描述 | 示例 |
65+ | ------------------- | ----------------------------------------- | ------------------------------------------------- |
66+ | ` <USERNAME>` | SQL 用户的用户名。 | `metrics` |
67+ | `<PASSWORD>` | SQL 用户的密码。 | `metrics_password` |
6768| `<TENANT_ENDPOINT>` | Databend Cloud 租户的端点 URL。 | `tnxxxxxxx.gw.aws-us-east-2.default.databend.com` |
68- | `<TENANT_ID>` | 租户的唯一标识符。 | `tnxxxxxxx` |
69- | `<PLATFORM>` | 托管租户的云平台。 | `aws` |
70- | `<REGION>` | 租户所在的区域。 | `us-east-2` |
69+ | `<TENANT_ID>` | 租户的唯一标识符。 | `tnxxxxxxx` |
70+ | `<PLATFORM>` | 托管租户的云平台。 | `aws` |
71+ | `<REGION>` | 租户所在的区域。 | `us-east-2` |
7172
72732. 使用以下命令启动 Prometheus(将 `</path/to/prometheus.yml>` 替换为您的 **prometheus.yml** 文件的完整路径):
7374
@@ -79,7 +80,7 @@ docker run -d \
7980 prom/prometheus
8081` ` `
8182
82- 3. 在浏览器中打开 Prometheus,网址为 http://localhost:9090,导航到 **Status** > **Target health**,并确认 `databend-cloud` 目标已列出且状态为 `UP`。
83+ 3. 在浏览器中打开 Prometheus,网址为 http://localhost:9090,导航到 **Status** > **Target health**,并确认 `databend-cloud` 目标的状态为 `UP`。
8384
8485
8586
@@ -92,14 +93,18 @@ docker run -d \
9293
9394# # 可用指标列表
9495
95- 请注意,所有指标都以 `databend_cloud_` 为前缀。
96+ 请注意,所有指标都带有 `databend_cloud_` 前缀。
97+
98+ :::note
99+ 这些指标处于 alpha 状态,可能会随时间变化。我们建议您密切监控这些指标,并相应调整您的监控设置。
100+ :: :
96101
97102# ## 查询指标
98103
99104以下是 Databend Cloud 中可用的查询指标列表:
100105
101106| 名称 | 类型 | 标签 | 描述 |
102- |----------------------| ---------| ------------------| ------------------------------ |
107+ | -------------------- | ------- | ---------------- | ---------------------------- |
103108| query_count | Counter | tenant,warehouse | 客户端发起的查询次数 |
104109| query_errors | Counter | tenant,warehouse | 客户端发起的查询错误次数 |
105110| query_request_bytes | Counter | tenant,warehouse | 客户端查询请求的字节数 |
@@ -110,21 +115,42 @@ docker run -d \
110115以下是 Databend Cloud 中可用的存储指标列表:
111116
112117| 名称 | 类型 | 标签 | 描述 |
113- |-------------------------------| -------| --------| ------------------------------------------------ |
118+ | ----------------------------- | ----- | ------ | ---------------------------------------------- |
114119| storage_total_size | Guage | tenant | 后端对象存储的总大小 |
115120| storage_staged_size | Guage | tenant | 后端对象存储中暂存文件的总大小 |
116121| storage_table_compressed_size | Guage | tenant | 当前表的后端对象存储的总大小 |
122+ | storage_non_current_size | Guage | tenant | 后端存储中非当前对象的总大小 |
117123
118124# ## 计算集群指标
119125
120126以下是 Databend Cloud 中可用的计算集群指标列表:
121127
122128| 名称 | 类型 | 标签 | 描述 |
123- |----------------------------------| ---------| ------------------------------| ---------------------------------------------- |
129+ | -------------------------------- | ------- | ---------------------------- | -------------------------------------------- |
124130| warehouse_status | Guage | tenant,warehouse,size,status | 计算集群状态的标志(挂起、运行等) |
125- | warehouse_session_queued_queries | Guage | tenant,warehouse | 当前等待队列中的查询 |
126- | warehouse_session_connections | Guage | tenant,warehouse | 当前会话数 |
127- | warehouse_storage_requests_count | Counter | tenant,warehouse,scheme,op | 后端存储的请求次数 |
131+ | warehouse_connections | Guage | tenant,warehouse | 当前的会话数 |
132+ | warehouse_queries_queued | Guage | tenant,warehouse | 当前等待队列中的查询数 |
133+ | warehouse_queries_running | Guage | tenant,warehouse | 当前运行的查询数 |
134+ | warehouse_queries_start_total | Counter | tenant,warehouse | 启动的查询总数 |
135+ | warehouse_queries_failed_total | Counter | tenant,warehouse | 失败的查询总数 |
136+ | warehouse_queries_success_total | Counter | tenant,warehouse | 成功的查询总数 |
137+ | warehouse_storage_requests_total | Counter | tenant,warehouse,scheme,op | 后端存储的请求次数 |
128138| warehouse_storage_requests_bytes | Counter | tenant,warehouse,scheme,op | 后端存储的请求字节数 |
129139| warehouse_data_scan_rows | Counter | tenant,warehouse | 从后端存储扫描的数据行数 |
130- | warehouse_data_write_rows | Counter | tenant,warehouse | 写入后端存储的数据行数 |
140+ | warehouse_data_write_rows | Counter | tenant,warehouse | 写入后端存储的数据行数 |
141+
142+ # ## 任务指标
143+
144+ 以下是 Databend Cloud 中可用的任务指标列表:
145+
146+ | 名称 | 类型 | 标签 | 描述 |
147+ | ------------------------------- | ------- | ------------- | ------------------------- |
148+ | task_scheduled_total | Counter | tenant,task | 计划的任务总数 |
149+ | task_query_requests_total | Counter | tenant,task | 任务的查询请求总数 |
150+ | task_run_skipped_total | Counter | tenant,task | 跳过的任务运行总数 |
151+ | task_accessor_requests_total | Counter | tenant,function | 任务的访问器请求总数 |
152+ | task_notification_success_total | Counter | tenant | 成功的任务通知总数 |
153+ | task_notification_errors_total | Counter | tenant | 任务通知错误总数 |
154+ | task_running_duration_seconds | Counter | tenant,task | 任务运行持续时间(秒) |
155+ | task_running | Counter | tenant,task | 正在运行的任务 |
156+ | task_scheduled_timestamp | Counter | tenant,task | 计划任务的时间戳 |
0 commit comments