From ebc8730a61c77d27a2e807b7473ea107af46b015 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Mon, 12 Jun 2023 19:42:52 +0800 Subject: [PATCH 1/2] update data, bk_log, cc, gsekit, monitor_v3, nodeman, usermanage confapis --- .../bk/apis/data/toolkit/configs.py | 1 + .../cc/apidocs/en/search_inst_by_object.md | 2 +- .../apidocs/zh_hans/search_inst_by_object.md | 2 +- .../bk/apisv2/usermanage/fe_list_users.py | 63 +++++++ .../usermanage/fe_update_user_language.py | 38 +++++ .../confapis/bk_log/apidocs/en/fast_create.md | 151 +++++++++++++++++ .../confapis/bk_log/apidocs/en/fast_update.md | 116 +++++++++++++ .../apidocs/zh_hans/databus_custom_create.md | 75 ++++++-- .../apidocs/zh_hans/databus_custom_update.md | 91 ++++++++-- .../bk_log/apidocs/zh_hans/fast_create.md | 151 +++++++++++++++++ .../bk_log/apidocs/zh_hans/fast_update.md | 116 +++++++++++++ .../components/confapis/bk_log/bk_log.yaml | 99 +++++++++++ .../apidocs/en/list_process_related_info.md | 3 + .../cc/apidocs/en/transfer_host_across_biz.md | 59 +++++++ .../zh_hans/list_process_related_info.md | 5 +- .../zh_hans/transfer_host_across_biz.md | 61 +++++++ paas2/esb/components/confapis/cc/cc.yaml | 20 ++- .../components/confapis/data/dataflow.yaml | 9 - .../components/confapis/data/v3_aiops.yaml | 9 + .../components/confapis/data/v3_dataflow.yaml | 9 + .../confapis/data/v3_langserver.yaml | 8 + .../components/confapis/gsekit/gsekit.yaml | 33 ++++ .../confapis/monitor_v3/monitor_v3.yaml | 160 +++++++++++++++++- .../components/confapis/nodeman/nodeman.yaml | 33 ++++ paas2/esb/components/esb_conf.py | 18 +- 25 files changed, 1283 insertions(+), 49 deletions(-) create mode 100644 paas2/esb/components/bk/apisv2/usermanage/fe_list_users.py create mode 100644 paas2/esb/components/bk/apisv2/usermanage/fe_update_user_language.py create mode 100644 paas2/esb/components/confapis/bk_log/apidocs/en/fast_create.md create mode 100644 paas2/esb/components/confapis/bk_log/apidocs/en/fast_update.md create mode 100644 paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_create.md create mode 100644 paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_update.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/en/transfer_host_across_biz.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_across_biz.md create mode 100644 paas2/esb/components/confapis/data/v3_langserver.yaml diff --git a/paas2/esb/components/bk/apis/data/toolkit/configs.py b/paas2/esb/components/bk/apis/data/toolkit/configs.py index c6b7c8260..9fbd9c689 100644 --- a/paas2/esb/components/bk/apis/data/toolkit/configs.py +++ b/paas2/esb/components/bk/apis/data/toolkit/configs.py @@ -48,4 +48,5 @@ "datalab": getattr(settings, "DATAV3_DATALABAPI_HOST", ""), "aiops": getattr(settings, "DATAV3_AIOPSAPI_HOST", ""), "resourcecenter": getattr(settings, "DATAV3_RESOURCECENTERAPI_HOST", ""), + "langserver": getattr(settings, "DATAV3_LANGSERVER_HOST", ""), } diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_inst_by_object.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_inst_by_object.md index 37be7a6a4..7fba0981d 100644 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_inst_by_object.md +++ b/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_inst_by_object.md @@ -70,7 +70,7 @@ The condition parameter is all the fields defined by the model corresponding to "info": [ { "bk_inst_id": 0, - "bk_inst_name": "default area", + "bk_inst_name": "Default Area", "bk_supplier_account": "123456789" } ] diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_inst_by_object.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_inst_by_object.md index 07077ac05..3e7b3d4ad 100644 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_inst_by_object.md +++ b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_inst_by_object.md @@ -70,7 +70,7 @@ condition 参数为查询的目标实例对应的模型定义的所有字段 "info": [ { "bk_inst_id": 0, - "bk_inst_name": "default area", + "bk_inst_name": "Default Area", "bk_supplier_account": "123456789" } ] diff --git a/paas2/esb/components/bk/apisv2/usermanage/fe_list_users.py b/paas2/esb/components/bk/apisv2/usermanage/fe_list_users.py new file mode 100644 index 000000000..3a0562bed --- /dev/null +++ b/paas2/esb/components/bk/apisv2/usermanage/fe_list_users.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +""" +Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS +Community Edition) available. +Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://opensource.org/licenses/MIT +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. +""" +from common.constants import API_TYPE_Q +from components.component import Component, SetupConfMixin +from .toolkit import configs + + +class FeListUsers(Component, SetupConfMixin): + suggest_method = "GET" + label = "fe list users" + label_en = "fe list users" + + sys_name = configs.SYSTEM_NAME + api_type = API_TYPE_Q + + def handle(self): + comp_obj = self.prepare_other( + "generic.v2.usermanage.usermanage_component", + kwargs=self.request.kwargs, + ) + comp_obj.setup_conf( + { + "name": "fe_list_users", + "dest_http_method": "GET", + "dest_path": "/api/v2/profiles/", + } + ) + + result = comp_obj.invoke() + + # 去除敏感信息 + users = result["data"] + if isinstance(users, dict): + users = users.get("results", []) + elif not isinstance(users, list): + users = [] + + replaced_data_for_sensitive = { + "qq": "", + "email": "", + "telephone": "", + "wx_userid": "", + "password_valid_days": -1, + "account_expiration_date": "", + "create_time": "", + "update_time": "", + "extras": {}, + } + for user in users: + for key, value in replaced_data_for_sensitive.items(): + if key in user: + user[key] = value + + self.response.payload = result diff --git a/paas2/esb/components/bk/apisv2/usermanage/fe_update_user_language.py b/paas2/esb/components/bk/apisv2/usermanage/fe_update_user_language.py new file mode 100644 index 000000000..17196a582 --- /dev/null +++ b/paas2/esb/components/bk/apisv2/usermanage/fe_update_user_language.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +""" +Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS +Community Edition) available. +Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://opensource.org/licenses/MIT +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. +""" +from common.constants import API_TYPE_OP +from components.component import Component, SetupConfMixin +from .toolkit import configs + + +class FeUpdateUserLanguage(Component, SetupConfMixin): + suggest_method = "PUT" + label = "切换用户语言" + label_en = "update user language" + + sys_name = configs.SYSTEM_NAME + api_type = API_TYPE_OP + + def handle(self): + comp_obj = self.prepare_other( + "generic.v2.usermanage.usermanage_component", + kwargs=self.request.kwargs, + ) + comp_obj.setup_conf( + { + "name": "update_user_language", + "dest_path": "/api/v2/profiles/{id}/languages/".format(id=self.current_user.username), + "dest_http_method": "PUT", + } + ) + + self.response.payload = comp_obj.invoke() \ No newline at end of file diff --git a/paas2/esb/components/confapis/bk_log/apidocs/en/fast_create.md b/paas2/esb/components/confapis/bk_log/apidocs/en/fast_create.md new file mode 100644 index 000000000..4c1899d22 --- /dev/null +++ b/paas2/esb/components/confapis/bk_log/apidocs/en/fast_create.md @@ -0,0 +1,151 @@ +## [API] Fast Create (Easy way to create collector config) + +fast_create + +Path: /api/v1/databus/collectors/fast_create/ + +HTTP Method: `POST`, `application/json` + +### Request Parameters + + +| Field | Type| Required | Description | +|-----------|------------|--------|-----------------------------------------------------------------------------------------------| +| bk_biz_id | Int | Yes| CC biz | +| collector_config_name | string | Yes| Name| +| collector_config_name_en | string | Yes| English name | +| collector_scenario_id | string | Yes| Scenario type, ENum: (row,section,wineventlog,custom) | +| data_link_id | string| No | Data link id | +| category_id | string | Yes | Category id, ENum: (os, application, host, other_rt)| +| target_object_type | string| Yes | ENum: SERVICE, HOST| +| target_node_type | string | Yes | ENum: TOPO, INSTANCE, SERVICE_TEMPLATE, SET_TEMPLATE, DYNAMIC_GROUP| +| target_nodes | list | No | See TargetNodes Params| +| data_encoding | string | No | Charset, Default UTF-8| +| description | string | No | Description | +| environment | string | No | ENum: linux, windows | +| params | dict | yes | See Plugins params | +| etl_config | string | No | ENum: bk_log_text, bk_log_json, bk_log_delimiter, bk_log_regexp, custom, default: bk_log_text | +| etl_params | dict | No | See ETL Params | +| fields | list | No | See ETL Fields params | +| storage_cluster_id | string| Yes | ES cluster id| +| retention | int | No | Data retention | +| allocation_min_days | int | No | Validity time of hot and cold data, default: 0| +| storage_replies | int | no | Replica count| +| es_shards | int | No | ES Shard count | + + +#### ETL Parameters + + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| separator_regexp | string | No | Regular expression | +| separator | string | No | separator | +| retain_original_text | bool | No | Remain the original text, default: True | + + +#### TargetNodes Parameters + + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| id | Int | No| Service instance id | +| bk_inst_id | id | No| Node instance id | +| bk_obj_id | string | No| Node instance object | +| ip | string | No| Host instance ip | +| bk_cloud_id | int | No| BK cloud id | +| bk_supplier_id | string | No| BK supplier id | + + + +#### Plugin Param Parameters + + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| paths | list | No| log path | +| conditions | dict | No| See Plugin Condition params| + +#### Plugin Condition Parameters + + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| type | string | Yes | Filter type, ENum: match, separator | +| match_type | string | No| Filter match type, Enum: include, exclude | +| match_content | string | No| Filter content | +| separator | string | No| separator | +| separator_filters | dict | No| See Plugin Condition Separator Filters params | + + +#### Plugin Condition Separator Filter Parameters + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| fieldindex | string | Yes | Location of the match | +| word | string | Yes| Match the value | +| op | string | Yes | The matching way | +| logic_op | string | Yes | logic operator | + + +### Request Parameters Example + +```json +{ + "bk_biz_id": 1, + "collector_config_name": "20220729_88", + "collector_config_name_en": "20220729_en_88", + "collector_scenario_id": "row", + "category_id": "os", + "target_object_type": "HOST", + "target_node_type": "TOPO", + "target_nodes": [{"bk_inst_id": 2, "bk_obj_id": "biz"}], + "params": { + "paths": ["/var/log"], + "conditions": { +"type": "match" + } + }, + "storage_cluster_id": 1, + "es_shards": 1, + "retention": 1 +} +``` + +### Response Parameters + +| Field | Type| Description| +| ------- | ------ | ------------ | +| result | bool| true or false| +| code | int | status code | +| message | string | error message returned when result is false | +| data | dict| log content | + + +### Response "data" fields + +| Field| Type| Description| +| ------- | ------ | ------------ | +| collector_config_id | int| Collector config id | +| bk_data_id | int | BK Monitor data id | +| subscription_id | int | BKNode subscription id | +| task_id_list | list| BKNode task id list | + + +### Response Example + +```json +{ + "result": true, + "data": { + "collector_config_id": 1, + "bk_data_id": 1, + "subscription_id": 1, + "task_id_list": [ +"1" + ] + }, + "code": 0, + "message": "" +} +``` diff --git a/paas2/esb/components/confapis/bk_log/apidocs/en/fast_update.md b/paas2/esb/components/confapis/bk_log/apidocs/en/fast_update.md new file mode 100644 index 000000000..5e71e8c78 --- /dev/null +++ b/paas2/esb/components/confapis/bk_log/apidocs/en/fast_update.md @@ -0,0 +1,116 @@ +## [API] Fast Update (Easy way to update collector config) + +fast_update + +Path: /api/v1/databus/collectors/{collector_config_id}/fast_update/ + +HTTP Method: `POST`, `application/json` + +### Request Parameters + + +| Field | Type| Required | Description | +|-----------|------------|--------|-----| +| collector_config_name | string | Yes| Name| +| target_nodes | list | No | See TargetNodes Params| +| description | string | No | Description | +| params | dict | yes | See Plugins params | +| etl_config | string | No | ENum: bk_log_text, bk_log_json, bk_log_delimiter, bk_log_regexp, custom, default: bk_log_text | +| etl_params | dict | No | See ETL Params | +| fields | list | No | See ETL Fields params | +| retention | int | No | Data retention | +| allocation_min_days | int | No | Validity time of hot and cold data, default: 0| +| storage_replies | int | no | Replica count| +| es_shards | int | No | ES Shard count | + + +#### ETL Parameters + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| separator_regexp | string | No | Regular expression | +| separator | string | No | separator | +| retain_original_text | bool | No | Remain the original text, default: True | + + +#### TargetNodes Parameters + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| id | Int | No| Service instance id | +| bk_inst_id | id | No| Node instance id | +| bk_obj_id | string | No| Node instance object | +| ip | string | No| Host instance ip | +| bk_cloud_id | int | No| BK cloud id | +| bk_supplier_id | string | No| BK supplier id | + + + +#### Plugin Param Parameters + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| paths | list | No| log path | +| conditions | dict | No| See Plugin Condition params| + + +#### Plugin Condition Parameters + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| type | string | Yes | Filter type, ENum: match, separator | +| match_type | string | No| Filter match type, Enum: include, exclude | +| match_content | string | No| Filter content | +| separator | string | No| separator | +| separator_filters | dict | No| See Plugin Condition Separator Filters params | + + +#### Plugin Condition Separator Filter Parameters + +| Field | Type| Required | Description | +|-----------|------------|--------|------------| +| fieldindex | string | Yes | Location of the match | +| word | string | Yes| Match the value | +| op | string | Yes | The matching way | +| logic_op | string | Yes | logic operator | + + +### Request Parameters Example + +```json +{ + "es_shards": 1, + "storage_replies": 1, + "description": "11111" +} +``` + +### Response Parameters + +| Field | Type| Description| +| ------- | ------ | ------------ | +| result | bool| true or false| +| code | int | status code | +| message | string | error message returned when result is false | +| data | dict| log content | + + +### Response "data" fields + +| Field| Type| Description| +| ------- | ------ | ------------ | +| collector_config_id | int| Collector config id | + + +### Response Example + +```json +{ + "result": true, + "data": { + "collector_config_id": 1, + }, + "code": 0, + "message": "" +} +``` diff --git a/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_create.md b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_create.md index 779c8819d..33ac2878d 100644 --- a/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_create.md +++ b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_create.md @@ -6,20 +6,48 @@ #### 接口参数 -| 字段 | 类型 | 必选 | 描述 | -|--------------------------|--------|-----|-----------------------------------------------------| -| 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 | 否 | 描述信息 | +| 字段 | 类型 | 必选 | 描述 | +|--------------------------|--------|-----|---------------------------------------------------------------------------| +| 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",代表这个数据是业务的应用日志 | +| etl_config | string | 否 | 清洗类型,可选值(bk_log_delimiter、bk_log_regexp、bk_log_json),默认为bk_log_text,即不做清洗 | +| etl_params | dict | 否 | 对应清洗类型的配置,见下面的参数介绍 (当配置了etl_config后,该字段为必须) | +| fields | list | 否 | 清洗后的字段配置,见下面的参数介绍 (当配置了etl_config后,该字段为必须) | +| retention | int | 否 | 存储时间 (注意:指定存储后,该字段为必须) | +| es_shards | int | 否 | 索引分片数 (注意:指定存储后,该字段为必须) | +| storage_replies | int | 否 | 存储副本数 (注意:指定存储后,该字段为必须) | +| allocation_min_days | int | 否 | n天后的数据,转到冷节点,只在集群开启了冷热时生效 (注意:指定存储后,该字段为必须) | +| data_link_id | int | 否 | 数据传输链路,不需要可以不填 | +| description | string | 否 | 描述信息 | + + +##### etl_params 参数 + +| 字段 | 类型 | 必选 | 描述 | +|----------------------|--------|-----|--------------------------------| +| retain_original_text | bool | 否 | 是否保留原始日志字段,即log字段,默认保留true设置即可 | +| separator | string | 否 | 分隔符,当类型为bk_log_delimiter时配置 | +| separator_regexp | string | 否 | 正则表达式,当类型为bk_log_regexp时配置 | + + +##### fields 参数 + +| 字段 | 类型 | 必选 | 描述 | +|--------------|--------|-----|-----------------------------------------------------------------------------| +| field_index | int | 是 | 字段顺序 | +| field_name | string | 是 | 字段名称 | +| field_type | string | 是 | 字段类型(int, long, double, string, object, nested) | +| alias_name | string | 否 | 字段别名,一般清洗为json时,可配置上这个对字段重命名 | +| description | string | 否 | 字段描述信息 | +| is_delete | bool | 是 | 字段是否被删除,保留为false即可 | +| is_dimension | bool | 否 | 是否为维度字段,默认为true,代表字段是可聚合的 | +| is_time | bool | 否 | 是否为时间字段,默认为false,如果指定的话,需要通过option参数配置时间的具体格式和时区 | +| is_analyzed | bool | 否 | 是否为分词字段,默认为false,一般如果是文本类型的,建议设置为true | +| is_built_in | bool | 否 | 是否为内置字段,默认为false,一般不需要设置该字段,保留为false即可 | +| option | dict | 否 | 字段配置,一般设置为时间字段后需要配置,例如:{"time_zone":8, "time_format":"yyyy-MM-dd HH:mm:ss"} | ### 请求参数示例 @@ -36,6 +64,25 @@ "custom_type": "log", "category_id": "application_check", + "etl_config": "bk_log_delimiter", + "etl_params": { + "retain_original_text": true, + "separator": " " + }, + "fields": [ + { + "field_index":1, + "field_name":"custom_1", + "field_type":"int", + "alias_name":"", + "description":"自定义字段说明1", + + "is_delete":false, + "is_analyzed":false, + "is_built_in":false, + "is_dimension":false + } + ], "storage_cluster_id": 15, "retention": 3, diff --git a/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_update.md b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_update.md index 7ab8facfd..cad975bfe 100644 --- a/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_update.md +++ b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/databus_custom_update.md @@ -6,17 +6,47 @@ #### 接口参数 -| 字段 | 类型 | 必选 | 描述 | -|--------------------------|--------|-----|-----------------------------------------------------| -| 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 | 否 | 描述信息 | +| 字段 | 类型 | 必选 | 描述 | +|-----------------------|--------|-----|---------------------------------------------------------------------------| +| collector_config_name | string | 是 | 采集项中文名, 最多50个字符 | +| custom_type | string | 是 | 日志类型,无特殊要求一般固定为log。当前可选的值(log、otlp_trace、otlp_log) | +| category_id | string | 是 | 数据分类, 无特殊要求可以固定为"application_check", 代表这个数据是业务的应用日志 | +| etl_config | string | 否 | 清洗类型,可选值(bk_log_delimiter、bk_log_regexp、bk_log_json),默认为bk_log_text,即不做清洗 | +| etl_params | dict | 否 | 对应清洗类型的配置,见下面的参数介绍 (当配置了etl_config后,该字段为必须) | +| fields | list | 否 | 清洗后的字段配置,见下面的参数介绍 (当配置了etl_config后,该字段为必须) | +| storage_cluster_id | int | 否 | 存储ES集群,默认会选择一个公共集群作为存储,如果需要指定存储,则填写为日志平台注册后的集群ID | +| retention | int | 否 | 存储时间 (注意:指定存储后,该字段为必须) | +| es_shards | int | 否 | 索引分片数 (注意:指定存储后,该字段为必须) | +| storage_replies | int | 否 | 存储副本数 (注意:指定存储后,该字段为必须) | +| allocation_min_days | int | 否 | n天后的数据,转到冷节点,只在集群开启了冷热时生效 (注意:指定存储后,该字段为必须) | +| description | string | 否 | 描述信息 | + + +##### etl_params 参数 + +| 字段 | 类型 | 必选 | 描述 | +|----------------------|--------|-----|--------------------------------| +| retain_original_text | bool | 否 | 是否保留原始日志字段,即log字段,默认保留true设置即可 | +| separator | string | 否 | 分隔符,当类型为bk_log_delimiter时配置 | +| separator_regexp | string | 否 | 正则表达式,当类型为bk_log_regexp时配置 | + + +##### fields 参数 + +| 字段 | 类型 | 必选 | 描述 | +|--------------|--------|-----|-----------------------------------------------------------------------------| +| field_index | int | 是 | 字段顺序 | +| field_name | string | 是 | 字段名称 | +| field_type | string | 是 | 字段类型(int, long, double, string, object, nested) | +| alias_name | string | 否 | 字段别名,一般清洗为json时,可配置上这个对字段重命名 | +| description | string | 否 | 字段描述信息 | +| is_delete | bool | 是 | 字段是否被删除,保留为false即可 | +| is_dimension | bool | 否 | 是否为维度字段,默认为true,代表字段是可聚合的 | +| is_time | bool | 否 | 是否为时间字段,默认为false,如果指定的话,需要通过option参数配置时间的具体格式和时区 | +| is_analyzed | bool | 否 | 是否为分词字段,默认为false,一般如果是文本类型的,建议设置为true | +| is_built_in | bool | 否 | 是否为内置字段,默认为false,一般不需要设置该字段,保留为false即可 | +| option | dict | 否 | 字段配置,一般设置为时间字段后需要配置,例如:{"time_zone":8, "time_format":"yyyy-MM-dd HH:mm:ss"} | + ### 请求参数示例 @@ -30,6 +60,45 @@ "collector_config_name": "test_custom_config_name", "custom_type": "log", "category_id": "application_check", + + "etl_config":"bk_log_regexp", + "etl_params":{ + "retain_original_text":true, + "separator_regexp":"(?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}) (?P\\d+) (?P[A-Z]+) (?P.*)" + }, + "fields":[ + { + "field_index":1, + "field_name":"log_time", + "field_type":"string", + "alias_name":"", + "description":"", + + "is_delete": false, + "is_analyzed":false, + "is_built_in":false, + "is_dimension":false, + "is_time":true, + + "option":{ + "time_zone":8, + "time_format":"yyyy-MM-dd HH:mm:ss" + } + }, + { + "field_index":2, + "field_name":"content", + "field_type":"string", + "alias_name":"", + "description":"", + + "is_delete": false, + "is_analyzed":true, + "is_built_in":false, + "is_dimension":false, + "is_time": false + } + ], "storage_cluster_id": 15, "retention": 3, diff --git a/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_create.md b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_create.md new file mode 100644 index 000000000..bf0916d66 --- /dev/null +++ b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_create.md @@ -0,0 +1,151 @@ +## [API] Fast Create (快速创建一个采集项) + +fast_create + +Path: /api/v1/databus/collectors/fast_create/ + +HTTP Method: `POST`, `application/json` + +### 请求参数 + + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|--------------------------------------------------------------------------------------------| +| bk_biz_id | Int | Yes| CC biz | +| collector_config_name | string | Yes| 采集项名称 | +| collector_config_name_en | string | Yes| 采集项英文名 | +| collector_scenario_id | string | Yes| 日志类型, 枚举: (row,section,wineventlog,custom) | +| data_link_id | string| No | 数据链路ID | +| category_id | string | Yes | 分类ID, 枚举: (os, application, host, other_rt) | +| target_object_type | string| Yes | 目标类型, 枚举: (SERVICE, HOST) | +| target_node_type | string | Yes | 节点类型, 枚举: (TOPO, INSTANCE, SERVICE_TEMPLATE, SET_TEMPLATE, DYNAMIC_GROUP) | +| target_nodes | list | No | 目标节点, 详细见 TargetNodes Params | +| data_encoding | string | No | 编码, Default UTF-8 | +| description | string | No | 描述信息 | +| environment | string | No | 操作系统环境, 枚举: (linux, windows) | +| params | dict | yes | 采集插件参数, 详细见 Plugins params | +| etl_config | string | No | 清洗类型, 枚举: (bk_log_text, bk_log_json, bk_log_delimiter, bk_log_regexp, custom), 默认值: bk_log_text | +| etl_params | dict | No | 清洗参数, 详细见 ETL Params | +| fields | list | No | 字段配置, 详细见 ETL Fields params | +| storage_cluster_id | string| Yes | ES集群ID | +| retention | int | No | 数据过期时间 | +| allocation_min_days | int | No | 冷热数据生效时间, 默认值: 0 | +| storage_replies | int | no | 副本数 | +| es_shards | int | No | ES 分片数 | + + +#### ETL Parameters + + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|-----------------------------------------| +| separator_regexp | string | No | 正则表达式 | +| separator | string | No | 分隔符 | +| retain_original_text | bool | No | 是否保留原文, 默认值: True | + + +#### TargetNodes Parameters + + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| id | Int | No| 服务实例ID | +| bk_inst_id | id | No| 节点实例ID | +| bk_obj_id | string | No| 节点实例对象 | +| ip | string | No| IP | +| bk_cloud_id | int | No| 蓝鲸云区域ID | +| bk_supplier_id | string | No| 蓝鲸供应商ID | + + + +#### Plugin Param Parameters + + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| paths | list | No| 日志路径配置 | +| conditions | dict | No| See Plugin Condition params| + +#### Plugin Condition Parameters + + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|----------------------------------------------| +| type | string | Yes | 过滤方式类型, 枚举: (match, separator) | +| match_type | string | No| 过滤方式, 枚举: (include, exclude) | +| match_content | string | No| 过滤内容 | +| separator | string | No| 分割符 | +| separator_filters | dict | No| 过滤规则, 详情见 Plugin Condition Separator Filters params | + + +#### Plugin Condition Separator Filter Parameters + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| fieldindex | string | Yes | 匹配项所在位置 | +| word | string | Yes| 匹配值 | +| op | string | Yes | 匹配方式 | +| logic_op | string | Yes | 逻辑操作符 | + + +### 请求参数示例 + +```json +{ + "bk_biz_id": 1, + "collector_config_name": "20220729_88", + "collector_config_name_en": "20220729_en_88", + "collector_scenario_id": "row", + "category_id": "os", + "target_object_type": "HOST", + "target_node_type": "TOPO", + "target_nodes": [{"bk_inst_id": 2, "bk_obj_id": "biz"}], + "params": { + "paths": ["/var/log"], + "conditions": { +"type": "match" + } + }, + "storage_cluster_id": 1, + "es_shards": 1, + "retention": 1 +} +``` + +### 响应参数 + +| 字段 | 类型 | 描述 | +| ------- | ------ | ------------ | +| result | bool | 请求是否成功 | +| code | int | 返回的状态码 | +| message | string | 描述信息 | +| data | dict | 返回日志内容 | + + +### 响应 "data" 字段 + +| 字段 | 类型 | 描述 | +| ------- | ------ | ------------ | +| collector_config_id | int| Collector config id | +| bk_data_id | int | BK Monitor data id | +| subscription_id | int | BKNode subscription id | +| task_id_list | list| BKNode task id list | + + +### 返回结果示例 + +```json +{ + "result": true, + "data": { + "collector_config_id": 1, + "bk_data_id": 1, + "subscription_id": 1, + "task_id_list": [ +"1" + ] + }, + "code": 0, + "message": "" +} +``` diff --git a/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_update.md b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_update.md new file mode 100644 index 000000000..49cee8ef0 --- /dev/null +++ b/paas2/esb/components/confapis/bk_log/apidocs/zh_hans/fast_update.md @@ -0,0 +1,116 @@ +## [API] Fast Update (快速修改采集项) + +fast_update + +Path: /api/v1/databus/collectors/{collector_config_id}/fast_update/ + +HTTP Method: `POST`, `application/json` + +### 请求参数 + + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|-----| +| collector_config_name | string | Yes| Name| +| target_nodes | list | No | See TargetNodes Params| +| description | string | No | Description | +| params | dict | yes | See Plugins params | +| etl_config | string | No | ENum: bk_log_text, bk_log_json, bk_log_delimiter, bk_log_regexp, custom, default: bk_log_text | +| etl_params | dict | No | See ETL Params | +| fields | list | No | See ETL Fields params | +| retention | int | No | Data retention | +| allocation_min_days | int | No | Validity time of hot and cold data, default: 0| +| storage_replies | int | no | Replica count| +| es_shards | int | No | ES Shard count | + + +#### ETL Parameters + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| separator_regexp | string | No | 正则表达式 | +| separator | string | No | separator | +| retain_original_text | bool | No | 是否保留原文, 默认值: True | + + +#### TargetNodes Parameters + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| id | Int | No| 服务实例ID | +| bk_inst_id | id | No| 节点实例ID | +| bk_obj_id | string | No| 节点实例对象 | +| ip | string | No| IP | +| bk_cloud_id | int | No| 蓝鲸云区域ID | +| bk_supplier_id | string | No| 蓝鲸供应商ID | + + + +#### Plugin Param Parameters + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|-------------------------------------| +| paths | list | No| 日志路径配置 | +| conditions | dict | No| 插件过滤方式, 详情见 Plugin Condition params | + + +#### Plugin Condition Parameters + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| type | string | Yes | 过滤方式类型, 枚举: (match, separator) | +| match_type | string | No| 过滤方式, 枚举: (include, exclude) | +| match_content | string | No| 过滤内容 | +| separator | string | No| separator | +| separator_filters | dict | No| 过滤规则, 详情见 Plugin Condition Separator Filters params | + + +#### Plugin Condition Separator Filter Parameters + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| fieldindex | string | Yes | 匹配项所在位置 | +| word | string | Yes| 匹配值 | +| op | string | Yes | 匹配方式 | +| logic_op | string | Yes | 逻辑操作符 | + + +### 请求参数示例 + +```json +{ + "es_shards": 1, + "storage_replies": 1, + "description": "11111" +} +``` + +### 响应参数 + +| 字段 | 类型 | 描述 | +| ------- | ------ | ------------ | +| result | bool| true or false| +| code | int | status code | +| message | string | error message returned when result is false | +| data | dict| log content | + + +### 响应 "data" 字段 + +| Field| Type| Description| +| ------- | ------ | ------------ | +| collector_config_id | int| Collector config id | + + +### 返回结果示例 + +```json +{ + "result": true, + "data": { + "collector_config_id": 1, + }, + "code": 0, + "message": "" +} +``` diff --git a/paas2/esb/components/confapis/bk_log/bk_log.yaml b/paas2/esb/components/confapis/bk_log/bk_log.yaml index 43576d683..0845d5da3 100644 --- a/paas2/esb/components/confapis/bk_log/bk_log.yaml +++ b/paas2/esb/components/confapis/bk_log/bk_log.yaml @@ -177,6 +177,17 @@ dest_http_method: POST is_hidden: True +- path: /v2/bk_log/delete_index_set/{index_set_id}/ + name: delete_index_set + label: 日志平台-删除索引集 + label_en: bk_log delete index-set + method: DELETE + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/index_set/{index_set_id}/ + dest_http_method: DELETE + is_hidden: True + - path: /v2/bk_log/databus_collectors/{collector_config_id}/report_token/ name: databus_collector_report_token label: 日志平台-获取上报Token @@ -772,6 +783,39 @@ dest_http_method: DELETE is_hidden: True +- path: /v2/bk_log/retry_bcs_collector/{rule_id}/ + name: retry_bcs_collector + label: 日志平台-重试bcs采集项 + label_en: bk_log retry bcs collector + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/collectors/{rule_id}/retry_bcs_collector/ + dest_http_method: POST + is_hidden: True + +- path: /v2/bk_log/start_bcs_collector/{rule_id}/ + name: start_bcs_collector + label: 日志平台-启用bcs采集项 + label_en: bk_log start bcs collector + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/collectors/{rule_id}/start_bcs_collector/ + dest_http_method: POST + is_hidden: True + +- path: /v2/bk_log/stop_bcs_collector/{rule_id}/ + name: stop_bcs_collector + label: 日志平台-重试bcs采集项 + label_en: bk_log stop bcs collector + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/collectors/{rule_id}/stop_bcs_collector/ + dest_http_method: POST + is_hidden: True + - path: /v2/bk_log/iam/meta/check_allowed/ name: iam_check_allowed label: 日志平台-检查IAM权限 @@ -859,3 +903,58 @@ dest_path: /api/v1/databus/collectors/{collector_config_id}/custom_update/ dest_http_method: POST is_hidden: True + +- path: /v2/bk_log/search/index_set/{index_set_id}/date_histogram/ + name: date_histogram + label: 日志平台-按照时间聚合 + label_en: bk_log update databus storage + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/search/index_set/{index_set_id}/aggs/date_histogram/ + dest_http_method: POST + is_hidden: True + +- path: /v2/bk_log/databus_data_link/ + name: databus_data_link + label: 日志平台-获取数据链路 + label_en: bk_log data link api + method: GET + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/data_link/ + dest_http_method: GET + is_hidden: True + +- path: /v2/bk_log/create_data_link/ + name: create_data_link + label: 日志平台-创建数据链路 + label_en: bk_log create data link api + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/data_link/ + dest_http_method: POST + is_hidden: True + +- path: /v2/bk_log/{data_link_id}/update_data_link/ + name: update_data_link + label: 日志平台-更新数据链路 + label_en: bk_log update data link api + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/data_link/{data_link_id}/ + dest_http_method: PUT + is_hidden: True + +- path: /v2/bk_log/databus_collectors/{collector_config_id}/start/ + name: list_databus_collectors + label: 日志平台-启动采集项 + label_en: bk_log start collector + method: POST + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/collectors/{collector_config_id}/start/ + dest_http_method: POST + is_hidden: True diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md b/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md index 940ce0bbc..e47355d57 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md @@ -105,6 +105,9 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ "bk_host_id": 4, "bk_cloud_id": 0, "bk_host_innerip": "192.168.15.22" + "bk_host_innerip_v6":"1::1", + "bk_addressing":"dynamic", + "bk_agent_id":"xxxxxx" }, "service_instance": { "id": 4, diff --git a/paas2/esb/components/confapis/cc/apidocs/en/transfer_host_across_biz.md b/paas2/esb/components/confapis/cc/apidocs/en/transfer_host_across_biz.md new file mode 100644 index 000000000..1c6050f40 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/transfer_host_across_biz.md @@ -0,0 +1,59 @@ +### Functional description + +transfer hosts from one business to another business. can only transfer hosts between resource sets(v3.10.27+, permissions: host transferred to other business) + +### Request Parameters + +#### General Parameters +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +| ------------- | ----- | -------- | ------------------------------------------------- | +| src_bk_biz_id | int | Yes | the source business id these hosts belongs to | +| bk_host_id | array | Yes | to be transfered hosts id list, max length is 500 | +| dst_bk_biz_id | int | Yes | the target business id | +| bk_module_id | int | Yes | the target module id,must be one of idle set's module | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "src_bk_biz_id": 2, + "dst_bk_biz_id": 3, + "bk_host_id": [ + 9, + 10 + ], + "bk_module_id": 10 +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "data": null, + "message": "success", + "permission": null, + "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" +} +``` + +### Return result parameter description +#### response + +| name | type | description | +| ------- | ------ | ------------------------------------- | +| result | bool | The success or failure of the request. true: the request was successful; false: the request failed.| +| code | int | The error code. 0 means success, >0 means failure error.| +| message | string | The error message returned by the failed request.| +| permission | object | Permission information | +| request_id | string | request_chain_id | +| data | object | data returned by the request| diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md index ee1017f1e..8560a059e 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md @@ -104,7 +104,10 @@ "host": { "bk_host_id": 4, "bk_cloud_id": 0, - "bk_host_innerip": "192.168.15.22" + "bk_host_innerip": "192.168.15.22", + "bk_host_innerip_v6":"1::1", + "bk_addressing":"dynamic", + "bk_agent_id":"xxxxxx" }, "service_instance": { "id": 4, diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_across_biz.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_across_biz.md new file mode 100644 index 000000000..9522322ef --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_across_biz.md @@ -0,0 +1,61 @@ +### 功能描述 + +跨业务转移主机,只能将源业务空闲机池集群中的主机转移到目标业务的空闲机池集群(v3.10.27+,权限:主机转移到其他业务) + +### 请求参数 + +#### 通用参数 + +{{ common_args_desc }} + + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| ------------- | ----- | ---- | ------------------------------------------------------- | +| src_bk_biz_id | int | 是 | 要转移的主机所属的业务ID | +| bk_host_id | array | 是 | 要转移的主机id列表,最大长度为500 | +| dst_bk_biz_id | int | 是 | 主机要转移到的业务ID | +| bk_module_id | int | 是 | 主机要转移到的模块ID,该模块ID必须为下空闲机池set下的模块ID。 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "src_bk_biz_id": 2, + "dst_bk_biz_id": 3, + "bk_host_id": [ + 9, + 10 + ], + "bk_module_id": 10 +} +``` + +### 返回结果示例 + +```json +{ + "result":true, + "code":0, + "data":null, + "message":"success", + "permission":null, + "request_id":"87de106ab55549bfbcc46e47ecf5bcc7" +} +``` + +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| request_id | string | 请求链id | +| data | object | 请求返回的数据 | diff --git a/paas2/esb/components/confapis/cc/cc.yaml b/paas2/esb/components/confapis/cc/cc.yaml index 1c45cc0d1..353706147 100644 --- a/paas2/esb/components/confapis/cc/cc.yaml +++ b/paas2/esb/components/confapis/cc/cc.yaml @@ -447,7 +447,7 @@ - path: /v2/cc/search_cloud_area/ name: search_cloud_area - label: 查询云区域 + label: 查询管控区域 label_en: Query cloud area suggest_method: POST api_type: query @@ -457,7 +457,7 @@ - path: /v2/cc/create_cloud_area/ name: create_cloud_area - label: 创建云区域 + label: 创建管控区域 label_en: create a cloud area suggest_method: POST api_type: operate @@ -467,7 +467,7 @@ - path: /v2/cc/update_cloud_area/ name: update_cloud_area - label: 更新云区域 + label: 更新管控区域 label_en: update cloud area suggest_method: POST api_type: operate @@ -477,7 +477,7 @@ - path: /v2/cc/delete_cloud_area/ name: delete_cloud_area - label: 删除云区域 + label: 删除管控区域 label_en: delete cloud area suggest_method: POST api_type: operate @@ -799,7 +799,7 @@ - path: /v2/cc/update_host_cloud_area_field/ name: update_host_cloud_area_field - label: 更新主机的云区域字段 + label: 更新主机的管控区域字段 label_en: update host's cloud area field (bk_cloud_id) suggest_method: POST api_type: query @@ -1410,3 +1410,13 @@ dest_path: /api/v3/update/project/bk_project_id dest_http_method: PUT is_hidden: true + +- path: /v2/cc/transfer_host_across_biz/ + name: transfer_host_across_biz + label: 跨业务转移主机 + label_en: transfer host across business + suggest_method: POST + api_type: operate + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/hosts/modules/across/biz + dest_http_method: POST diff --git a/paas2/esb/components/confapis/data/dataflow.yaml b/paas2/esb/components/confapis/data/dataflow.yaml index 44ad76c2c..7d9ffce0e 100644 --- a/paas2/esb/components/confapis/data/dataflow.yaml +++ b/paas2/esb/components/confapis/data/dataflow.yaml @@ -384,12 +384,3 @@ dest_http_method: GET is_hidden: true -- path: /data/v3/dataflow/flow/get_latest_msg/ - name: v3_dataflow_flow_get_latest_msg_get - label: 获取节点使用的结果表最近一条数据 - method: GET - comp_codename: generic.data.datav3_component - dest_path: /v3/dataflow/flow/get_latest_msg/ - dest_http_method: GET - is_hidden: true - diff --git a/paas2/esb/components/confapis/data/v3_aiops.yaml b/paas2/esb/components/confapis/data/v3_aiops.yaml index df4feeff9..0936e7efa 100644 --- a/paas2/esb/components/confapis/data/v3_aiops.yaml +++ b/paas2/esb/components/confapis/data/v3_aiops.yaml @@ -2355,3 +2355,12 @@ dest_http_method: PUT is_hidden: true + +- path: /data/v3/aiops/serving/{data_processing_id}/model_file/ + name: v3_aiops_serving__data_processing_id__model_file + label: 获取应用模型文件内容 + method: GET + comp_codename: generic.data.datav3_component + dest_path: /v3/aiops/serving/{data_processing_id}/model_file/ + dest_http_method: GET + is_hidden: true diff --git a/paas2/esb/components/confapis/data/v3_dataflow.yaml b/paas2/esb/components/confapis/data/v3_dataflow.yaml index b8d872897..424ee02a7 100644 --- a/paas2/esb/components/confapis/data/v3_dataflow.yaml +++ b/paas2/esb/components/confapis/data/v3_dataflow.yaml @@ -771,3 +771,12 @@ dest_path: /v3/dataflow/tool/result_tables/{result_table_id}/add_partitions/get_latest_log/ dest_http_method: GET is_hidden: true + +- path: /data/v3/dataflow/flow/get_latest_msg/ + name: v3_dataflow_flow_get_latest_msg_get + label: 获取节点使用的结果表最近一条数据 + method: GET + comp_codename: generic.data.datav3_component + dest_path: /v3/dataflow/flow/get_latest_msg/ + dest_http_method: GET + is_hidden: true diff --git a/paas2/esb/components/confapis/data/v3_langserver.yaml b/paas2/esb/components/confapis/data/v3_langserver.yaml new file mode 100644 index 000000000..a25ced49b --- /dev/null +++ b/paas2/esb/components/confapis/data/v3_langserver.yaml @@ -0,0 +1,8 @@ +- path: /data/v3/langserver/functions/ + name: v3_langserver_functions_get + label: 获取函数列表 + method: GET + comp_codename: generic.data.datav3_component + dest_path: /v3/langserver/functions/ + dest_http_method: GET + is_hidden: true diff --git a/paas2/esb/components/confapis/gsekit/gsekit.yaml b/paas2/esb/components/confapis/gsekit/gsekit.yaml index 25df67408..e32605419 100644 --- a/paas2/esb/components/confapis/gsekit/gsekit.yaml +++ b/paas2/esb/components/confapis/gsekit/gsekit.yaml @@ -67,3 +67,36 @@ path: /v2/gsekit/api/meta/access_overview/ dest_http_method: GET suggest_method: GET + +- api_type: operate + comp_codename: generic.v2.gsekit.gsekit_component + name: gray_build + label: GSE2.0灰度 + label_en: null + dest_path: /api/core/gray/build/ + path: /v2/gsekit/api/core/gray/build/ + dest_http_method: POST + suggest_method: POST + is_hidden: true + +- api_type: operate + comp_codename: generic.v2.gsekit.gsekit_component + name: gray_rollback + label: GSE2.0灰度回滚 + label_en: null + dest_path: /api/core/gray/rollback/ + path: /v2/gsekit/api/core/gray/rollback/ + dest_http_method: POST + suggest_method: POST + is_hidden: true + +- api_type: query + comp_codename: generic.v2.gsekit.gsekit_component + name: gray_info + label: 获取GSE 2.0灰度信息 + label_en: null + dest_path: /api/core/gray/info/ + path: /v2/gsekit/api/core/gray/info/ + dest_http_method: GET + suggest_method: GET + is_hidden: true diff --git a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml index 088a288a0..8e73f7876 100644 --- a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml +++ b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml @@ -1709,14 +1709,14 @@ method: GET - api_type: query comp_codename: generic.v2.monitor_v3.monitor_v3_component - dest_http_method: GET + dest_http_method: POST dest_path: /apm_api/v1/topo/query_topo_relation/ is_hidden: true label: 查询topo关系 label_en: query apm topo relation name: query_apm_topo_relation path: /v2/monitor_v3/query_apm_topo_relation/ - method: GET + method: POST - api_type: query comp_codename: generic.v2.monitor_v3.monitor_v3_component dest_http_method: GET @@ -1877,6 +1877,28 @@ path: /v2/monitor_v3/query_apm_span_list/ method: POST +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/query_span_statistics/ + is_hidden: true + label: 查询接口统计列表 + label_en: query apm span statistics + name: query_apm_span_statistics + path: /v2/monitor_v3/query_apm_span_statistics/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/query_service_statistics/ + is_hidden: true + label: 查询服务统计列表 + label_en: query apm service statistics + name: query_apm_service_statistics + path: /v2/monitor_v3/query_apm_service_statistics/ + method: POST + - api_type: query comp_codename: generic.v2.monitor_v3.monitor_v3_component dest_http_method: POST @@ -2154,4 +2176,136 @@ label_en: deploy event plugin name: deploy_event_plugin path: /v2/monitor_v3/deploy_event_plugin/ - method: POST \ No newline at end of file + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/list_data_pipeline/ + is_hidden: true + label: 查询链路管道 + label_en: list_data_pipeline + name: metadata_list_data_pipeline + path: /v2/monitor_v3/metadata_list_data_pipeline/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/meta/create_data_pipeline/ + is_hidden: true + label: 创建链路管道 + label_en: create_data_pipeline + name: metadata_create_data_pipeline + path: /v2/monitor_v3/metadata_create_data_pipeline/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/meta/update_data_pipeline/ + is_hidden: true + label: 更新链路管道 + label_en: update_data_pipeline + name: metadata_update_data_pipeline + path: /v2/monitor_v3/metadata_update_data_pipeline/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/get_storage_cluster_info/ + is_hidden: true + label: 查询集群信息 + label_en: get_storage_cluster_info + name: metadata_get_storage_cluster_info + path: /v2/monitor_v3/metadata_get_storage_cluster_info/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/get_etl_config/ + is_hidden: true + label: 查询场景类型 + label_en: get_etl_config + name: metadata_get_etl_config + path: /v2/monitor_v3/metadata_get_etl_config/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/get_transfer_list/ + is_hidden: true + label: 查询 transfer 集群列表 + label_en: get_transfer_list + name: metadata_get_transfer_list + path: /v2/monitor_v3/metadata_get_transfer_list/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/check_cluster_health/ + is_hidden: true + label: 检测集群连通性 + label_en: check_cluster_health + name: metadata_check_cluster_health + path: /v2/monitor_v3/metadata_check_cluster_health/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/list_data_source_by_data_pipeline/ + is_hidden: true + label: 查询使用管道的数据源信息 + label_en: list_data_source_by_data_pipeline + name: metadata_list_data_source_by_data_pipeline + path: /v2/monitor_v3/metadata_list_data_source_by_data_pipeline/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/list_clusters/ + is_hidden: true + label: 查询已经注册的集群 + label_en: list_clusters + name: metadata_list_clusters + path: /v2/monitor_v3/metadata_list_clusters/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/get_storage_cluster_detail/ + is_hidden: true + label: 查询集群详情 + label_en: get_storage_cluster_detail + name: metadata_get_storage_cluster_detail + path: /v2/monitor_v3/metadata_get_storage_cluster_detail/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/meta/register_cluster/ + is_hidden: true + label: 注册集群 + label_en: register_cluster + name: metadata_register_cluster + path: /v2/monitor_v3/metadata_register_cluster/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/meta/update_registered_cluster/ + is_hidden: true + label: 注册集群 + label_en: update_registered_cluster + name: metadata_update_registered_cluster + path: /v2/monitor_v3/metadata_update_registered_cluster/ + method: POST diff --git a/paas2/esb/components/confapis/nodeman/nodeman.yaml b/paas2/esb/components/confapis/nodeman/nodeman.yaml index fd128c3a8..8d1225a8f 100644 --- a/paas2/esb/components/confapis/nodeman/nodeman.yaml +++ b/paas2/esb/components/confapis/nodeman/nodeman.yaml @@ -1132,3 +1132,36 @@ dest_http_method: POST suggest_method: POST is_hidden: true + +- api_type: query + comp_codename: generic.v2.nodeman.nodeman_component + name: gray_info + label: 获取GSE 2.0灰度信息 + label_en: null + dest_path: /core/api/gray/info/ + path: /v2/nodeman/core/api/gray/info/ + dest_http_method: GET + suggest_method: GET + is_hidden: true + +- api_type: operate + comp_codename: generic.v2.nodeman.nodeman_component + name: upgrade_to_agent_id + label: 升级到Agent ID配置 + label_en: null + dest_path: /core/api/gray/upgrade_to_agent_id/ + path: /v2/nodeman/core/api/gray/upgrade_to_agent_id/ + dest_http_method: POST + suggest_method: POST + is_hidden: true + +- api_type: operate + comp_codename: generic.v2.nodeman.nodeman_component + name: rollback_agent_id + label: 回滚Agent ID配置 + label_en: null + dest_path: /core/api/gray/rollback_agent_id/ + path: /v2/nodeman/core/api/gray/rollback_agent_id/ + dest_http_method: POST + suggest_method: POST + is_hidden: true diff --git a/paas2/esb/components/esb_conf.py b/paas2/esb/components/esb_conf.py index 4f7b85fef..312253a44 100644 --- a/paas2/esb/components/esb_conf.py +++ b/paas2/esb/components/esb_conf.py @@ -528,13 +528,10 @@ def _rel_path(x): ( "/v2/usermanage/fe_list_users/", { - "comp_codename": "generic.v2.usermanage.usermanage_component", + "comp_codename": "generic.v2.usermanage.fe_list_users", "request_validators": [UserAuthWithBKTokenValidator()], "is_hidden": True, "comp_conf": { - "name": "fe_list_users", - "dest_http_method": "GET", - "dest_path": "/api/v2/profiles/", "is_support_jsonp": True, }, }, @@ -567,6 +564,19 @@ def _rel_path(x): }, }, ), + ( + "/v2/usermanage/fe_update_user_language/", + { + "comp_codename": "generic.v2.usermanage.fe_update_user_language", + "method": "PUT", + "request_validators": [UserAuthWithBKTokenValidator()], + "is_hidden": True, + "comp_conf": { + "name": "fe_update_user_language", + "is_support_jsonp": True, + }, + }, + ), ( "/v2/usermanage/fs_list_users/", { From b2c2ea478396f9038385e7fecd39c256182c15ab Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Mon, 12 Jun 2023 19:45:58 +0800 Subject: [PATCH 2/2] update release info --- paas2/VERSION | 2 +- paas2/release.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/paas2/VERSION b/paas2/VERSION index 556f84b0c..383ac32bb 100644 --- a/paas2/VERSION +++ b/paas2/VERSION @@ -1 +1 @@ -2.14.49 +2.14.50 diff --git a/paas2/release.md b/paas2/release.md index f6c6e854d..d1de91d9e 100644 --- a/paas2/release.md +++ b/paas2/release.md @@ -1,5 +1,9 @@ Release Log =============================== +# 2.14.50 + - esb: update data, bk_log, cc, gsekit, monitor_v3, nodeman, usermanage confapis + - esb: fix usermanage fe_list_users + # 2.14.49 - add: env var `BK_API_URL_TMPL` for all app