Skip to content

Commit

Permalink
Merge pull request #1071 from alex-smile/ft_esb_update_apis_20230328
Browse files Browse the repository at this point in the history
ESB 更新配置类组件
  • Loading branch information
alex-smile authored Mar 28, 2023
2 parents 0a8203c + 09a600f commit 55113a2
Show file tree
Hide file tree
Showing 11 changed files with 234 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paas2/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.14.44
2.14.45
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
### 功能描述

自定义上报日志创建接口

### 请求参数

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
|--------------------------|--------|-----|-----------------------------------------------------|
| bk_biz_id | int || 业务ID, 或空间ID |
| collector_config_name_en | string || 采集英文名称,重要,5-50个字符,仅包含字母数字下划线 |
| collector_config_name | string || 采集项中文名, 最多50个字符 |
| custom_type | string || 日志类型,无特殊要求一般固定为log。当前可选的值(log、otlp_trace、otlp_log) |
| category_id | string || 数据分类, 无特殊要求可以固定为"application_check", 代表这个数据是业务的应用日志 |
| storage_cluster_id | int || 存储ES集群,默认会选择一个公共集群作为存储,如果需要指定存储,则填写为日志平台注册后的集群ID |
| retention | int || 存储时间 (注意:指定存储后,该字段为必须) |
| es_shards | int || 索引分片数 (注意:指定存储后,该字段为必须) |
| storage_replies | int || 存储副本数 (注意:指定存储后,该字段为必须) |
| allocation_min_days | int || n天后的数据,转到冷节点,只在集群开启了冷热时生效 (注意:指定存储后,该字段为必须) |
| data_link_id | int || 数据传输链路,不需要可以不填 |
| description | string || 描述信息 |


### 请求参数示例

```json
{
"bk_app_code": "replace_me_with_bk_app_code",
"bk_app_secret": "replace_me_with_bk_app_secret",
"bk_username": "replace_me_with_bk_username",

"bk_biz_id": 2,
"collector_config_name": "test_custom_config_name",
"collector_config_name_en": "test_custom_config_name_en",
"custom_type": "log",
"category_id": "application_check",


"storage_cluster_id": 15,
"retention": 3,
"es_shards": 1,
"storage_replies": 0,
"allocation_min_days": 0,

"data_link_id": 1,
"description": ""

}
```

### 响应参数

| 字段 | 类型 | 描述 |
| ------- | ------ |---------|
| result | bool | 请求是否成功 |
| code | int | 返回的状态码 |
| message | string | 描述信息 |
| data | dict | 返回配置项内容 |


### 返回日志内容字段
| 字段 | 类型 | 描述 |
| ------- | ------ |--|
| collector_config_id | int | 采集项ID |
| index_set_id | int | 索引集ID,查询时使用 |
| bk_data_id | int | 数据管道ID |


### 返回结果示例

```json
{
"result": true,
"data": {
"collector_config_id": 1026,
"index_set_id": 481367,
"bk_data_id": 1578495
},
"code": 0,
"message": ""
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
### 功能描述

自定义上报日志更新接口

### 请求参数

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
|--------------------------|--------|-----|-----------------------------------------------------|
| collector_config_name | string || 采集项中文名, 最多50个字符 |
| custom_type | string || 日志类型,无特殊要求一般固定为log。当前可选的值(log、otlp_trace、otlp_log) |
| category_id | string || 数据分类, 无特殊要求可以固定为"application_check", 代表这个数据是业务的应用日志 |
| storage_cluster_id | int || 存储ES集群,默认会选择一个公共集群作为存储,如果需要指定存储,则填写为日志平台注册后的集群ID |
| retention | int || 存储时间 (注意:指定存储后,该字段为必须) |
| es_shards | int || 索引分片数 (注意:指定存储后,该字段为必须) |
| storage_replies | int || 存储副本数 (注意:指定存储后,该字段为必须) |
| allocation_min_days | int || n天后的数据,转到冷节点,只在集群开启了冷热时生效 (注意:指定存储后,该字段为必须) |
| description | string || 描述信息 |


### 请求参数示例

```json
{
"bk_app_code": "replace_me_with_bk_app_code",
"bk_app_secret": "replace_me_with_bk_app_secret",
"bk_username": "replace_me_with_bk_username",

"collector_config_name": "test_custom_config_name",
"custom_type": "log",
"category_id": "application_check",

"storage_cluster_id": 15,
"retention": 3,
"es_shards": 1,
"storage_replies": 0,
"allocation_min_days": 0,

"description": ""
}
```

### 响应参数

| 字段 | 类型 | 描述 |
| ------- | ------ |--------|
| result | bool | 请求是否成功 |
| code | int | 返回的状态码 |
| message | string | 描述信息 |


### 返回结果示例

```json
{
"result": true,
"data": null,
"code": 0,
"message": ""
}
```
67 changes: 66 additions & 1 deletion paas2/esb/components/confapis/bk_log/bk_log.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,28 @@
dest_http_method: POST
is_hidden: True

- path: /v2/bk_log/databus_collectors/{collector_config_id}/report_token/
name: databus_collector_report_token
label: 日志平台-获取上报Token
label_en: bk_log get report token
method: GET
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/{collector_config_id}/report_token/
dest_http_method: GET
is_hidden: True

- path: /v2/bk_log/databus_collectors/report_host/
name: databus_collector_report_host
label: 日志平台-获取上报Host
label_en: bk_log get report token
method: GET
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/report_host/
dest_http_method: GET
is_hidden: True

- path: /v2/bk_log/databus_collectors/{collector_config_id}/tail/
name: databus_collector_tail
label: 日志平台-获取kafka采样
Expand Down Expand Up @@ -783,7 +805,7 @@
dest_http_method: GET
is_hidden: True

- path: /v1/bk_log/meta/spaces/mine/
- path: /v2/bk_log/meta/spaces/mine/
name: meta_spaces_mine
label: 日志平台-获取用户空间列表
label_en: bk_log get spaces mine
Expand All @@ -794,3 +816,46 @@
dest_http_method: GET
is_hidden: True

- path: /v2/bk_log/databus/collectors/fast_create/
name: collectors_fast_create
label: 日志平台-快速创建采集项
label_en: bk_log fast create collector_config
method: POST
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/fast_create/
dest_http_method: POST
is_hidden: True

- path: /v2/bk_log/databus/collectors/{collector_config_id}/fast_update/
name: collectors_fast_update
label: 日志平台-快速修改采集项
label_en: bk_log fast update collector_config
method: POST
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/{collector_config_id}/fast_update/
dest_http_method: POST
is_hidden: True

- path: /v2/bk_log/databus_custom_create/
name: databus_custom_create
label: 日志平台-创建自定义上报配置项
label_en: bk_log create custom report collector_config
method: POST
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/custom_create/
dest_http_method: POST
is_hidden: True

- path: /v2/bk_log/{collector_config_id}/databus_custom_update/
name: databus_custom_update
label: 日志平台-更新自定义上报配置项
label_en: bk_log update custom report collector_config
method: POST
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/{collector_config_id}/custom_update/
dest_http_method: POST
is_hidden: True
11 changes: 10 additions & 1 deletion paas2/esb/components/confapis/data/v3_dataflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@
dest_http_method: PUT
is_hidden: true

- path: /data/v3/dataflow/flow/flows/{fid}/nodes/{nid}/
name: v3_dataflow_flow_flows__fid__nodes__nid__patch
label: 更新节点部分信息
method: PATCH
comp_codename: generic.data.datav3_component
dest_path: /v3/dataflow/flow/flows/{fid}/nodes/{nid}/
dest_http_method: PATCH
is_hidden: true

- path: /data/v3/dataflow/flow/flows/{fid}/nodes/{nid}/monitor_data/
name: v3_dataflow_flow_flows__fid__nodes__nid__monitor_data_get
label: 根据nid获取监控打点信息
Expand Down Expand Up @@ -761,4 +770,4 @@
comp_codename: generic.data.datav3_component
dest_path: /v3/dataflow/tool/result_tables/{result_table_id}/add_partitions/get_latest_log/
dest_http_method: GET
is_hidden: true
is_hidden: true
10 changes: 10 additions & 0 deletions paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,16 @@
name: query_metric_dimensions
path: /v2/monitor_v3/query_metric_dimensions/
method: GET
- api_type: query
comp_codename: generic.v2.monitor_v3.monitor_v3_component
dest_http_method: POST
dest_path: /apm_api/v1/application/query_discover_rules/
is_hidden: true
label: 查询拓扑发现规则
label_en: query apm discover rules
name: query_apm_discover_rules
path: /v2/monitor_v3/query_discover_rules/
method: POST
- api_type: query
comp_codename: generic.v2.monitor_v3.monitor_v3_component
dest_http_method: GET
Expand Down
2 changes: 2 additions & 0 deletions paas2/release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Release Log
===============================
# 2.14.45
- update: esb update data, monitor_v3, bk_log confapis

# 2.14.44
- bugfix: app visiable scope error
Expand Down

0 comments on commit 55113a2

Please sign in to comment.