Skip to content

Commit 0fcc3d7

Browse files
committed
minor
1 parent f2f7b1d commit 0fcc3d7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

zh_CN/prometheus/overview.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# 概述
2+
23
Datalayers 支持 Prometheus 的 HTTP API 和 Remote Write 协议。通过这一特性,用户可以将现有的 Prometheus 生态工具无缝接入 Datalayers,无需修改代码即可实现数据写入和查询。
34

4-
# 主要特性
5+
## 主要特性
6+
57
- 兼容 Prometheus HTTP API,可直接对接 Grafana 等生态组件。
68
- 兼容 Prometheus Remote Write 协议,可接收 Prometheus 的实时数据推送。
79
- 支持 PromQL (Prometheus Query Language),兼容主流查询语法与函数。
810

9-
# 核心价值
11+
## 核心价值
12+
1013
- 平滑迁移: 无需修改现有的数据采集和可视化工具链。
1114
- 高性能/长期存储: 利用 Datalayers 的存储优势,解决原生 Prometheus 在大规模或长期存储场景下的性能和容量瓶颈。

zh_CN/prometheus/quick-start.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Remote Write
1+
# 快速开始
2+
3+
## Remote Write
24

35
通过 Prometheus Remote Write 协议,可以将 Prometheus 中的数据快速导入 Datalayers。为此,您需要在 Prometheus 的配置文件中增加以下内容,将 Datalayers 设置为 Remote Write 端点:
46

@@ -18,7 +20,7 @@ remote_write:
1820
- `<dbname>` 表示数据将要导入的数据库名称,该数据库需要预先创建
1921
- `<username>``<password>` 表示用于认证的用户名和密码
2022

21-
# HTTP API
23+
## HTTP API
2224

2325
导入 Datalayers 的数据可以通过以下 Prometheus HTTP API 进行查询:
2426

@@ -56,7 +58,7 @@ curl -v \
5658

5759
更多关于 HTTP API 的内容可参考![官方文档](https://prometheus.io/docs/prometheus/latest/querying/api/)
5860

59-
## 注意事项
61+
### 注意事项
6062

6163
相较于 Prometheus,Datalayers 有额外的数据库的概念,每个 metric 都归属于某个数据库,因此在查询时需要显式指明数据库的名称。
6264

@@ -65,7 +67,7 @@ curl -v \
6567
1. 在 HTTP 请求的 header 中增加 `database: <dbname>`,之后查询的 metric 都会默认归属该数据库
6668
2. 或者通过标签 `__database__` 指定数据库,如 `up{__database__="dbname"}`。通过这种方式可以覆盖 HTTP header 中指定的数据库。
6769

68-
# Grafana
70+
## Grafana
6971

7072
您可以直接将 Datalayers 作为 Prometheus 数据源添加到 Grafana 中,具体步骤如下:
7173

0 commit comments

Comments
 (0)