Skip to content

Commit 305f5c1

Browse files
committed
chore: backport to 0.16
Signed-off-by: shuiyisong <xixing.sys@gmail.com>
1 parent 6e8500b commit 305f5c1

12 files changed

Lines changed: 40 additions & 40 deletions

File tree

i18n/zh/docusaurus-plugin-content-docs/version-0.16/reference/http-endpoints.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ is_strict_mode = false
222222
## 日志写入端点
223223

224224
- **路径**:
225-
- `/v1/events/logs`
226-
- `/v1/events/pipelines/{pipeline_name}`
227-
- `/v1/events/pipelines/dryrun`
225+
- `/v1/ingest`
226+
- `/v1/pipelines/{pipeline_name}`
227+
- `/v1/pipelines/dryrun`
228228
- **方法**:
229229
- `POST` 写入日志和添加 Pipeline。
230230
- `DELETE` 用于删除 Pipeline。

i18n/zh/docusaurus-plugin-content-docs/version-0.16/user-guide/ingest-data/for-observability/fluent-bit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ description: 将 GreptimeDB 与 Fluent bit 集成以实现 Prometheus Remote Wri
1919
Match *
2020
Host greptimedb
2121
Port 4000
22-
Uri /v1/events/logs?db=public&table=your_table&pipeline_name=pipeline_if_any
22+
Uri /v1/ingest?db=public&table=your_table&pipeline_name=pipeline_if_any
2323
Format json
2424
Json_date_key scrape_timestamp
2525
Json_date_format iso8601

i18n/zh/docusaurus-plugin-content-docs/version-0.16/user-guide/ingest-data/for-observability/loki.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ loki.write "greptime_loki" {
222222
2. [上传](/user-guide/logs/manage-pipelines.md#create-a-pipeline) pipeline 配置到数据库:
223223
224224
```bash
225-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/pp" -F "file=@pipeline.yaml"
225+
curl -X "POST" "http://localhost:4000/v1/pipelines/pp" -F "file=@pipeline.yaml"
226226
```
227227

228228
3. 启动 Alloy Docker 容器来处理日志:

i18n/zh/docusaurus-plugin-content-docs/version-0.16/user-guide/logs/manage-pipelines.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GreptimeDB 提供了专用的 HTTP 接口用于创建 Pipeline。
2222

2323
```shell
2424
## 上传 pipeline 文件。test 为 Pipeline 的名称
25-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
25+
curl -X "POST" "http://localhost:4000/v1/pipelines/test" \
2626
-H "Authorization: Basic {{authentication}}" \
2727
-F "file=@pipeline.yaml"
2828
```
@@ -35,7 +35,7 @@ curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
3535

3636
```shell
3737
## test 为 Pipeline 的名称
38-
curl -X "DELETE" "http://localhost:4000/v1/events/pipelines/test?version=2024-06-27%2012%3A02%3A34.257312110Z" \
38+
curl -X "DELETE" "http://localhost:4000/v1/pipelines/test?version=2024-06-27%2012%3A02%3A34.257312110Z" \
3939
-H "Authorization: Basic {{authentication}}"
4040
```
4141

@@ -47,13 +47,13 @@ curl -X "DELETE" "http://localhost:4000/v1/events/pipelines/test?version=2024-06
4747

4848
```shell
4949
## test 是 Pipeline 的名称,该查询将返回最新版本的 Pipeline。
50-
curl "http://localhost:4000/v1/events/pipelines/test" \
50+
curl "http://localhost:4000/v1/pipelines/test" \
5151
-H "Authorization: Basic {{authentication}}"
5252
```
5353

5454
```shell
5555
## 如果你想查询某个 Pipeline 的历史版本,可以在 URL 中添加 `version` 参数
56-
curl "http://localhost:4000/v1/events/pipelines/test?version=2025-04-01%2006%3A58%3A31.335251882%2B0000" \
56+
curl "http://localhost:4000/v1/pipelines/test?version=2025-04-01%2006%3A58%3A31.335251882%2B0000" \
5757
-H "Authorization: Basic {{authentication}}"
5858
```
5959

@@ -193,7 +193,7 @@ Readable timestamp (UTC): 2024-06-27 12:02:34.257312110Z
193193
在创建 Pipeline 的时候你可能会遇到错误,例如使用如下配置创建 Pipeline:
194194

195195
```bash
196-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
196+
curl -X "POST" "http://localhost:4000/v1/pipelines/test" \
197197
-H "Content-Type: application/x-yaml" \
198198
-H "Authorization: Basic {{authentication}}" \
199199
-d $'processors:
@@ -229,7 +229,7 @@ Pipeline 配置存在错误。`gsub` processor 期望 `replacement` 字段为字
229229
因此,你需要修改 `gsub` processor 的配置,将 `replacement` 字段的值更改为字符串类型。
230230
231231
```bash
232-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
232+
curl -X "POST" "http://localhost:4000/v1/pipelines/test" \
233233
-H "Content-Type: application/x-yaml" \
234234
-H "Authorization: Basic {{authentication}}" \
235235
-d $'processors:
@@ -263,7 +263,7 @@ transform:
263263
**此接口仅仅用于测试 Pipeline 的处理结果,不会将日志写入到 GreptimeDB 中。**
264264

265265
```bash
266-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/dryrun?pipeline_name=test" \
266+
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
267267
-H "Content-Type: application/json" \
268268
-H "Authorization: Basic {{authentication}}" \
269269
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -275,7 +275,7 @@ curl -X "POST" "http://localhost:4000/v1/events/pipelines/dryrun?pipeline_name=t
275275
我们再将 message 字段的值修改为字符串类型,然后再次测试该 Pipeline。
276276

277277
```bash
278-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/dryrun?pipeline_name=test" \
278+
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
279279
-H "Content-Type: application/json" \
280280
-H "Authorization: Basic {{authentication}}" \
281281
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

i18n/zh/docusaurus-plugin-content-docs/version-0.16/user-guide/logs/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GreptimeDB 提供了一个内置 pipeline `greptime_identity` 用于处理 JSON
2222

2323
```shell
2424
curl -X POST \
25-
"http://localhost:4000/v1/events/logs?db=public&table=pipeline_logs&pipeline_name=greptime_identity" \
25+
"http://localhost:4000/v1/ingest?db=public&table=pipeline_logs&pipeline_name=greptime_identity" \
2626
-H "Content-Type: application/json" \
2727
-H "Authorization: Basic {{authentication}}" \
2828
-d '[
@@ -128,7 +128,7 @@ transform:
128128

129129
```shell
130130
curl -X "POST" \
131-
"http://localhost:4000/v1/events/pipelines/nginx_pipeline" \
131+
"http://localhost:4000/v1/pipelines/nginx_pipeline" \
132132
-H 'Authorization: Basic {{authentication}}' \
133133
-F "file=@pipeline.yaml"
134134
```
@@ -149,7 +149,7 @@ curl -X "POST" \
149149

150150
```shell
151151
curl -X POST \
152-
"http://localhost:4000/v1/events/logs?db=public&table=custom_pipeline_logs&pipeline_name=nginx_pipeline" \
152+
"http://localhost:4000/v1/ingest?db=public&table=custom_pipeline_logs&pipeline_name=nginx_pipeline" \
153153
-H "Content-Type: application/json" \
154154
-H "Authorization: Basic {{authentication}}" \
155155
-d '[

i18n/zh/docusaurus-plugin-content-docs/version-0.16/user-guide/logs/write-logs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ description: 介绍如何通过 HTTP 接口使用指定的 Pipeline 将日志写
1414
您可以使用以下命令通过 HTTP 接口写入日志:
1515

1616
```shell
17-
curl -X "POST" "http://localhost:4000/v1/events/logs?db=<db-name>&table=<table-name>&pipeline_name=<pipeline-name>&version=<pipeline-version>" \
17+
curl -X "POST" "http://localhost:4000/v1/ingest?db=<db-name>&table=<table-name>&pipeline_name=<pipeline-name>&version=<pipeline-version>" \
1818
-H "Content-Type: application/x-ndjson" \
1919
-H "Authorization: Basic {{authentication}}" \
2020
-d "$<log-items>"
@@ -190,7 +190,7 @@ mysql> select * from pipeline_logs;
190190

191191
设置如下的 URL 参数来指定自定义时间索引列:
192192
```shell
193-
curl -X "POST" "http://localhost:4000/v1/events/logs?db=public&table=pipeline_logs&pipeline_name=greptime_identity&custom_time_index=ts;epoch;s" \
193+
curl -X "POST" "http://localhost:4000/v1/ingest?db=public&table=pipeline_logs&pipeline_name=greptime_identity&custom_time_index=ts;epoch;s" \
194194
-H "Content-Type: application/json" \
195195
-H "Authorization: Basic {{authentication}}" \
196196
-d $'[{"action": "login", "ts": 1742814853}]'
@@ -231,7 +231,7 @@ DESC pipeline_logs;
231231
以下是一个示例请求:
232232

233233
```shell
234-
curl -X "POST" "http://localhost:4000/v1/events/logs?db=<db-name>&table=<table-name>&pipeline_name=greptime_identity&version=<pipeline-version>" \
234+
curl -X "POST" "http://localhost:4000/v1/ingest?db=<db-name>&table=<table-name>&pipeline_name=greptime_identity&version=<pipeline-version>" \
235235
-H "Content-Type: application/x-ndjson" \
236236
-H "Authorization: Basic {{authentication}}" \
237237
-H "x-greptime-pipeline-params: flatten_json_object=true" \
@@ -335,7 +335,7 @@ processors:
335335
如果你希望在写入日志时跳过错误,可以在 HTTP 请求的 query params 中添加 `skip_error` 参数。比如:
336336

337337
```shell
338-
curl -X "POST" "http://localhost:4000/v1/events/logs?db=<db-name>&table=<table-name>&pipeline_name=<pipeline-name>&version=<pipeline-version>&skip_error=true" \
338+
curl -X "POST" "http://localhost:4000/v1/ingest?db=<db-name>&table=<table-name>&pipeline_name=<pipeline-name>&version=<pipeline-version>&skip_error=true" \
339339
-H "Content-Type: application/x-ndjson" \
340340
-H "Authorization: Basic {{authentication}}" \
341341
-d "$<log-items>"

versioned_docs/version-0.16/reference/http-endpoints.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ Refer to the original Prometheus documentation for more information on the [Prom
222222
## Log Ingestion Endpoints
223223

224224
- **Paths**:
225-
- `/v1/events/logs`
226-
- `/v1/events/pipelines/{pipeline_name}`
227-
- `/v1/events/pipelines/dryrun`
225+
- `/v1/ingest`
226+
- `/v1/pipelines/{pipeline_name}`
227+
- `/v1/pipelines/dryrun`
228228
- **Methods**:
229229
- `POST` for ingesting logs and adding pipelines.
230230
- `DELETE` for deleting pipelines.

versioned_docs/version-0.16/user-guide/ingest-data/for-observability/fluent-bit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Using Fluent Bit's [HTTP Output Plugin](https://docs.fluentbit.io/manual/pipelin
1919
Match *
2020
Host greptimedb
2121
Port 4000
22-
Uri /v1/events/logs?db=public&table=your_table&pipeline_name=pipeline_if_any
22+
Uri /v1/ingest?db=public&table=your_table&pipeline_name=pipeline_if_any
2323
Format json
2424
Json_date_key scrape_timestamp
2525
Json_date_format iso8601

versioned_docs/version-0.16/user-guide/ingest-data/for-observability/loki.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ In the `greptime_loki`, the `x-greptime-pipeline-name` header is added to indica
222222
2. [Upload](/user-guide/logs/manage-pipelines.md#create-a-pipeline) the pipeline configuration to the database using `curl`:
223223

224224
```bash
225-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/pp" -F "file=@pipeline.yaml"
225+
curl -X "POST" "http://localhost:4000/v1/pipelines/pp" -F "file=@pipeline.yaml"
226226
```
227227

228228
3. Start the Alloy Docker container to process the logs:

versioned_docs/version-0.16/user-guide/logs/manage-pipelines.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Assuming you have prepared a pipeline configuration file `pipeline.yaml`, use th
2121

2222
```shell
2323
## Upload the pipeline file. 'test' is the name of the pipeline
24-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
24+
curl -X "POST" "http://localhost:4000/v1/pipelines/test" \
2525
-H "Authorization: Basic {{authentication}}" \
2626
-F "file=@pipeline.yaml"
2727
```
@@ -34,7 +34,7 @@ You can use the following HTTP interface to delete a pipeline:
3434

3535
```shell
3636
## 'test' is the name of the pipeline
37-
curl -X "DELETE" "http://localhost:4000/v1/events/pipelines/test?version=2024-06-27%2012%3A02%3A34.257312110Z" \
37+
curl -X "DELETE" "http://localhost:4000/v1/pipelines/test?version=2024-06-27%2012%3A02%3A34.257312110Z" \
3838
-H "Authorization: Basic {{authentication}}"
3939
```
4040

@@ -46,13 +46,13 @@ Querying a pipeline with a name through HTTP interface as follow:
4646

4747
```shell
4848
## 'test' is the name of the pipeline, it will return a pipeline with latest version if the pipeline named `test` exists.
49-
curl "http://localhost:4000/v1/events/pipelines/test" \
49+
curl "http://localhost:4000/v1/pipelines/test" \
5050
-H "Authorization: Basic {{authentication}}"
5151
```
5252

5353
```shell
5454
## with the version parameter, it will return the specify version pipeline.
55-
curl "http://localhost:4000/v1/events/pipelines/test?version=2025-04-01%2006%3A58%3A31.335251882%2B0000" \
55+
curl "http://localhost:4000/v1/pipelines/test?version=2025-04-01%2006%3A58%3A31.335251882%2B0000" \
5656
-H "Authorization: Basic {{authentication}}"
5757
```
5858

@@ -192,7 +192,7 @@ You may encounter errors when creating a Pipeline. For example, when creating a
192192

193193

194194
```bash
195-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
195+
curl -X "POST" "http://localhost:4000/v1/pipelines/test" \
196196
-H "Content-Type: application/x-yaml" \
197197
-H "Authorization: Basic {{authentication}}" \
198198
-d $'processors:
@@ -228,7 +228,7 @@ The pipeline configuration contains an error. The `gsub` Processor expects the `
228228
Therefore, We need to modify the configuration of the `gsub` Processor and change the value of the `replacement` field to a string type.
229229
230230
```bash
231-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/test" \
231+
curl -X "POST" "http://localhost:4000/v1/pipelines/test" \
232232
-H "Content-Type: application/x-yaml" \
233233
-H "Authorization: Basic {{authentication}}" \
234234
-d $'processors:
@@ -263,7 +263,7 @@ We can test the Pipeline using the `dryrun` interface. We will test it with erro
263263

264264

265265
```bash
266-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/dryrun?pipeline_name=test" \
266+
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
267267
-H "Content-Type: application/json" \
268268
-H "Authorization: Basic {{authentication}}" \
269269
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -275,7 +275,7 @@ The output indicates that the pipeline processing failed because the `gsub` Proc
275275
Let's change the value of the message field to a string type and test the pipeline again.
276276

277277
```bash
278-
curl -X "POST" "http://localhost:4000/v1/events/pipelines/dryrun?pipeline_name=test" \
278+
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
279279
-H "Content-Type: application/json" \
280280
-H "Authorization: Basic {{authentication}}" \
281281
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

0 commit comments

Comments
 (0)