From 45ce2794f321579bcffe36c093ccc7dad9f359e8 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Fri, 8 Oct 2021 17:24:46 +0800 Subject: [PATCH 1/6] update esb monitor_v3/jobv3/itsm/iam/cc confapis --- paas2/esb/components/confapis/cc/cc.yaml | 1 + .../components/confapis/iam/admin_api.yaml | 34 ++ .../confapis/iam/apidocs/en/application.md | 12 +- .../iam/apidocs/zh_hans/application.md | 12 +- .../apidocs/zh_hans/get_workflow_detail.md | 2 +- paas2/esb/components/confapis/itsm/itsm.yaml | 10 + .../apidocs/zh_hans/create_credential.md | 24 +- .../apidocs/zh_hans/operate_step_instance.md | 15 +- .../jobv3/apidocs/zh_hans/save_cron.md | 3 +- .../apidocs/zh_hans/update_credential.md | 26 +- .../zh_hans/delete_alarm_strategy_v2.md | 41 ++ .../metadata_create_time_series_group.md | 105 ++++ .../metadata_delete_time_series_group.md | 39 ++ .../zh_hans/metadata_get_time_series_group.md | 112 +++++ .../zh_hans/metadata_list_transfer_cluster.md | 39 ++ .../zh_hans/metadata_modify_data_id.md | 4 +- .../metadata_modify_time_series_group.md | 73 +++ .../zh_hans/metadata_query_tag_values.md | 48 ++ .../metadata_query_time_series_group.md | 114 +++++ .../apidocs/zh_hans/save_alarm_strategy.md | 36 +- .../apidocs/zh_hans/save_alarm_strategy_v2.md | 463 ++++++++++++++++++ .../apidocs/zh_hans/save_notice_group.md | 8 +- .../apidocs/zh_hans/search_alarm_strategy.md | 4 +- .../zh_hans/search_alarm_strategy_v2.md | 254 ++++++++++ .../apidocs/zh_hans/search_event.md | 6 +- .../zh_hans/update_partial_strategy_v2.md | 60 +++ .../confapis/monitor_v3/monitor_v3.yaml | 306 +++++++++++- 27 files changed, 1787 insertions(+), 64 deletions(-) create mode 100644 paas2/esb/components/confapis/iam/admin_api.yaml create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/delete_alarm_strategy_v2.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_create_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_delete_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_get_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_list_transfer_cluster.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_tag_values.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/update_partial_strategy_v2.md diff --git a/paas2/esb/components/confapis/cc/cc.yaml b/paas2/esb/components/confapis/cc/cc.yaml index f4a7d0147..1cd9efce4 100644 --- a/paas2/esb/components/confapis/cc/cc.yaml +++ b/paas2/esb/components/confapis/cc/cc.yaml @@ -866,6 +866,7 @@ comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/identifier/host/search dest_http_method: POST + is_hidden: true - path: /v2/cc/host_install_bk/ name: host_install_bk diff --git a/paas2/esb/components/confapis/iam/admin_api.yaml b/paas2/esb/components/confapis/iam/admin_api.yaml new file mode 100644 index 000000000..dbad84e5e --- /dev/null +++ b/paas2/esb/components/confapis/iam/admin_api.yaml @@ -0,0 +1,34 @@ +--- + +- path: /v2/iam/admin/groups/ + name: admin_api_list_group + label: 查询(全局)用户组列表 + label_en: admin api list group + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/admin/groups/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/admin/groups/{group_id}/members/ + name: admin_api_list_group_member + label: 查询用户组的成员列表 + label_en: admin api list group member + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/admin/groups/{group_id}/members/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/admin/subjects/{subject_type}/{subject_id}/groups/ + name: admin_api_list_group_of_subject_join + label: 查询Subject加入的用户组列表 + label_en: admin api list group of subject join + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/admin/subjects/{subject_type}/{subject_id}/groups/ + dest_http_method: GET + is_hidden: true diff --git a/paas2/esb/components/confapis/iam/apidocs/en/application.md b/paas2/esb/components/confapis/iam/apidocs/en/application.md index a37476396..b9e3eea53 100644 --- a/paas2/esb/components/confapis/iam/apidocs/en/application.md +++ b/paas2/esb/components/confapis/iam/apidocs/en/application.md @@ -10,7 +10,7 @@ application for access system | Field | Type | Required | Description | |-----------|------------|--------|------------| -| system | string | Yes | system id | +| system_id | string | Yes | system id | | actions | array | Yes | permission actions | #### actions @@ -24,7 +24,7 @@ application for access system | Field | Type | Required | Description | |-----------|------------|--------|------------| -| system | string | Yes | resource type system id | +| system_id | string | Yes | resource type system id | | type | string | Yes | resource type id | | instances | array[array] | Yes | resource instance | | attributes | array | No | attribute | @@ -56,13 +56,13 @@ application for access system ```python { - "system": "bk_job", + "system_id": "bk_job", "actions": [ { "id": "execute_job", "related_resource_types": [ { - "system": "bk_job", + "system_id": "bk_job", "type": "job", "instances": [ [ @@ -75,7 +75,7 @@ application for access system ] }, { - "system": "bk_cmdb", + "system_id": "bk_cmdb", "type": "host", "instances": [ [ @@ -136,4 +136,4 @@ application for access system | Field | Type | Description | |-----------|-----------|-----------| -| url | str | permission request redirect url | +| url | str | permission request redirect url | \ No newline at end of file diff --git a/paas2/esb/components/confapis/iam/apidocs/zh_hans/application.md b/paas2/esb/components/confapis/iam/apidocs/zh_hans/application.md index 3c5b292bc..6a427a214 100644 --- a/paas2/esb/components/confapis/iam/apidocs/zh_hans/application.md +++ b/paas2/esb/components/confapis/iam/apidocs/zh_hans/application.md @@ -10,7 +10,7 @@ | 字段 | 类型 | 必选 | 描述 | |-----------|------------|--------|------------| -| system | 字符串 | 是 | 系统id | +| system_id | 字符串 | 是 | 系统id | | actions | 数组 | 是 | 申请权限的操作 | #### actions @@ -24,7 +24,7 @@ | 字段 | 类型 | 必选 | 描述 | |-----------|------------|--------|------------| -| system | 字符串 | 是 | 资源类型的系统id | +| system_id | 字符串 | 是 | 资源类型的系统id | | type | 字符串 | 是 | 资源类型 | | instances | 数组[数组] | 否 | 资源实例 | | attributes | 数组 | 否 | 属性 | @@ -56,13 +56,13 @@ ```python { - "system": "bk_job", # 权限的系统 + "system_id": "bk_job", # 权限的系统 "actions": [ { "id": "execute_job", # 操作id "related_resource_types": [ # 关联的资源类型, 无关联资源类型的操作, 可以为空 { - "system": "bk_job", # 资源类型所属的系统id + "system_id": "bk_job", # 资源类型所属的系统id "type": "job", # 资源类型 "instances": [ # 申请权限的资源实例 [ # 带层级的实例表示 @@ -75,7 +75,7 @@ ] }, { - "system": "bk_cmdb", # 资源类型所属的系统id + "system_id": "bk_cmdb", # 资源类型所属的系统id "type": "host", # 操作依赖的另外一个资源类型 "instances": [ [ @@ -136,4 +136,4 @@ | 字段 | 类型 | 描述 | |-----------|-----------|-----------| -| url | 字符串 | 权限申请重定向URL | +| url | 字符串 | 权限申请重定向URL | \ No newline at end of file diff --git a/paas2/esb/components/confapis/itsm/apidocs/zh_hans/get_workflow_detail.md b/paas2/esb/components/confapis/itsm/apidocs/zh_hans/get_workflow_detail.md index 5b2872421..eb5eea5b2 100644 --- a/paas2/esb/components/confapis/itsm/apidocs/zh_hans/get_workflow_detail.md +++ b/paas2/esb/components/confapis/itsm/apidocs/zh_hans/get_workflow_detail.md @@ -1,6 +1,6 @@ ### 功能描述 -服务流程详情查询,支持根据指定的服务流程ID查询服务流程详情(暂不发布) +服务流程详情查询,支持根据指定的服务流程ID查询服务流程详情 ### 请求参数 diff --git a/paas2/esb/components/confapis/itsm/itsm.yaml b/paas2/esb/components/confapis/itsm/itsm.yaml index 257729820..1b12381cb 100644 --- a/paas2/esb/components/confapis/itsm/itsm.yaml +++ b/paas2/esb/components/confapis/itsm/itsm.yaml @@ -140,3 +140,13 @@ comp_codename: generic.v2.itsm.itsm_component dest_path: /o/bk_itsm/openapi/service/get_service_roles/ dest_http_method: GET + +- path: /v2/itsm/get_workflow_detail/ + name: get_workflow_detail + label: 服务流程详情 + label_en: get workflow detail + suggest_method: GET + api_type: query + comp_codename: generic.v2.itsm.itsm_component + dest_path: /openapi/workflow/get_workflow_detail/ + dest_http_method: GET \ No newline at end of file diff --git a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/create_credential.md b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/create_credential.md index f47ef85ab..34c03794e 100644 --- a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/create_credential.md +++ b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/create_credential.md @@ -8,16 +8,16 @@ #### 接口参数 -| 字段 | 类型 | 必选 | 描述 | -|-----------------|------------|--------|------------| -| bk_biz_id | long | 是 | 业务 ID | -| name | string | 是 | 凭据名称 | -| type | string | 是 | 凭据类型,取值可为ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY | -| description | string | 否 | 凭据描述 | -| access_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY时填写 | -| secret_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY/SECRET_KEY时填写 | -| username | string | 否 | 凭据类型为USERNAME_PASSWORD时填写 | -| password | string | 否 | 凭据类型为USERNAME_PASSWORD/PASSWORD时填写 | +| 字段 | 类型 | 必选 | 描述 | +|----------------------------|------------|--------|------------| +| bk_biz_id | long | 是 | 业务 ID | +| name | string | 是 | 凭据名称 | +| type | string | 是 | 凭据类型,取值可为ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY | +| description | string | 否 | 凭据描述 | +| credential_access_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY时填写 | +| credential_secret_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY/SECRET_KEY时填写 | +| credential_username | string | 否 | 凭据类型为USERNAME_PASSWORD时填写 | +| credential_password | string | 否 | 凭据类型为USERNAME_PASSWORD/PASSWORD时填写 | ### 请求参数示例 @@ -31,8 +31,8 @@ "name": "testCredential", "type": "USERNAME_PASSWORD", "description": "This is a test credential", - "username": "admin", - "password": "password" + "credential_username": "admin", + "credential_password": "password" } ``` diff --git a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/operate_step_instance.md b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/operate_step_instance.md index 7fb36c87e..6c686dc6c 100644 --- a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/operate_step_instance.md +++ b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/operate_step_instance.md @@ -13,7 +13,20 @@ | bk_biz_id | long | 是 | 业务ID | | job_instance_id | long | 是 | 作业实例ID | | step_instance_id | long | 是 | 步骤实例ID | -| operation_code | int | 是 | 操作类型:2、失败IP重做,3、忽略错误,4、执行,5、跳过,6、确认继续 8、全部重试,9、终止确认流程,10-重新发起确认 | +| operation_code | int | 是 | 操作类型:2、失败IP重做,3、忽略错误 6、确认继续 8、全部重试,9、终止确认流程,10-重新发起确认,11、进入下一步,12、强制跳过 | + + +##### operation_code 详细说明 +| operation_code | 操作类型 | 适用步骤 | 描述 | +|-----------|------------|--------|------------| +| 2 | 失败IP重做 | 脚本执行,文件分发步骤 | 对失败的IP重新下发任务 | +| 3 | 忽略错误 | 脚本执行,文件分发步骤 | 忽略错误,继续执行 | +| 6 | 确认继续 | 人工确认步骤 | 确认继续执行 | +| 8 | 全部重试 | 脚本执行,文件分发步骤 | 对所有的IP重新下发任务 | +| 9 | 终止确认流程 | 人工确认步骤 | 确认终止执行 | +| 10 | 重新发起确认 | 人工确认步骤 | 重新发起确认 | +| 11 | 进入下一步 | 脚本执行,文件分发步骤 | 当步骤状态为终止成功,用于继续执行后续步骤 | +| 12 | 强制跳过 | 脚本执行,文件分发步骤 | 当步骤状态为终止中,用于强制跳过当前步骤,执行后续步骤| ### 请求参数示例 diff --git a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/save_cron.md b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/save_cron.md index 34fd45751..a28265055 100644 --- a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/save_cron.md +++ b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/save_cron.md @@ -1,6 +1,6 @@ ### 功能描述 -新建或保存定时作业;新建定时作业,定时任务状态默认为暂停。 +新建或保存定时任务;新建定时任务,定时任务状态默认为暂停,如有需要可调用update_cron_status接口开启。 ### 请求参数 @@ -15,6 +15,7 @@ | id | long | 否 | 定时任务 ID,更新定时任务时,必须传这个值 | | name | string | 否 | 定时作业名称,新建时必填,修改时选填 | | expression | string | 否 | 定时任务 crontab 的定时规则,新建时必填,修改时选填,各字段含义为:分 时 日 月 周,如: 0/5 * * * ? 表示每5分钟执行一次 | +| execute_time | long | 否 | 定时任务单次执行的执行时间,Unix时间戳,新建定时任务时不可与expression同时为空 | | global_var_list | array | 否 | 全局变量信息,可使用 查询执行方案详情 接口查询方案可设置的变量信息 | #### global_var diff --git a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/update_credential.md b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/update_credential.md index 589aa11d5..e5c9e4750 100644 --- a/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/update_credential.md +++ b/paas2/esb/components/confapis/jobv3/apidocs/zh_hans/update_credential.md @@ -8,17 +8,17 @@ #### 接口参数 -| 字段 | 类型 | 必选 | 描述 | -|-----------------|------------|--------|------------| -| bk_biz_id | long | 是 | 业务 ID | -| id | string | 是 | 凭据 ID | -| name | string | 否 | 凭据名称 | -| type | string | 否 | 凭据类型,取值可为ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY | -| description | string | 否 | 凭据描述 | -| access_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY时填写 | -| secret_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY/SECRET_KEY时填写 | -| username | string | 否 | 凭据类型为USERNAME_PASSWORD时填写 | -| password | string | 否 | 凭据类型为USERNAME_PASSWORD/PASSWORD时填写 | +| 字段 | 类型 | 必选 | 描述 | +|----------------------------|------------|--------|------------| +| bk_biz_id | long | 是 | 业务 ID | +| id | string | 是 | 凭据 ID | +| name | string | 否 | 凭据名称 | +| type | string | 否 | 凭据类型,取值可为ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY | +| description | string | 否 | 凭据描述 | +| credential_access_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY时填写 | +| credential_secret_key | string | 否 | 凭据类型为ACCESS_KEY_SECRET_KEY/SECRET_KEY时填写 | +| credential_username | string | 否 | 凭据类型为USERNAME_PASSWORD时填写 | +| credential_password | string | 否 | 凭据类型为USERNAME_PASSWORD/PASSWORD时填写 | ### 请求参数示例 @@ -33,8 +33,8 @@ "name": "testCredential", "type": "USERNAME_PASSWORD", "description": "This is a new credential", - "username": "admin", - "password": "newPassword" + "credential_username": "admin", + "credential_password": "newPassword" } ``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/delete_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/delete_alarm_strategy_v2.md new file mode 100644 index 000000000..9dbd74f8b --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/delete_alarm_strategy_v2.md @@ -0,0 +1,41 @@ +### 功能描述 + +删除策略配置 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| :-------- | ---- | ---- | -------------- | +| bk_biz_id | int | 是 | 业务ID | +| ids | list | 是 | 告警策略ID列表 | + + +#### 示例数据 + +```json +{ + "bk_biz_id": 7, + "ids": [49] +} +``` + +### 响应参数 +| 字段 | 类型 | 描述 | +| ------- | ---- | --------------- | +| data | list | 已删除的策略ID列表 | + +#### 示例数据 +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": [ + 49 + ] +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_create_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_create_time_series_group.md new file mode 100644 index 000000000..4a364f8ec --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_create_time_series_group.md @@ -0,0 +1,105 @@ + + +### 功能描述 + +创建一个自定义时序分组ID +给定一个数据源和业务,创建一个归属的自定义时序分组ID + + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| -------------- | ------ | ---- | ----------- | +| bk_data_id | int | 是 | 数据源ID | +| bk_biz_id | int | 是 | 业务ID | +| time_series_group_name | string | 是 | 自定义时序分组名 | +| label | string | 是 | 自定义时序分组标签,用于表示监控对象,应该复用【result_table_label】类型下的标签 | +| operator | string | 是 | 操作者 | +| metric_info_list | array | 否 | 自定义时序列表 | + +#### time_series_info_list具体内容说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| field_name | string | 自定义时序名 | +| tag | array | 维度列表 | + +#### 请求示例 + +```json +{ + "bk_data_id": 123, + "bk_biz_id": 123, + "time_series_group_name": "自定义时序分组名", + "label": "application", + "operator": "system", + "metric_info_list": [{ + "field_name": "usage for update", + "tag_list": ["dimension_name"] + },{ + "field_name": "usage for create", + "tag_list": ["dimension_name"] + }] +} +``` + +### 返回结果 + +#### 字段说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| bk\_group_id | int | 新建的时序自定义时序分组ID | + + +#### 结果示例 + +```json +{ + "message":"OK", + "code":"0", + "data": { + "event_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "event_group_name": "时序自定义时序分组名", + "label": "application", + "is_enable": true, + "creator": "admin", + "create_time": "2019-10-10 10:10:10", + "last_modify_user": "admin", + "last_modify_time": "2020-10-10 10:10:10", + "metric_info_list": [{ + "field_name": "mem_usage", + "description": "mem_usage_2", + "unit": "M", + "type": "double", + "tag_list": [ + { + "field_name": "test_name", + "description": "test_name_2", + "unit": "M", + "type": "double", + } + ] + },{ + "field_name": "cpu_usage", + "description": "mem_usage_2", + "unit": "M", + "type": "double", + "tag_list": [ + { + "field_name": "test_name", + "description": "test_name_2", + "unit": "M", + "type": "double", + } + ] + }] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_delete_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_delete_time_series_group.md new file mode 100644 index 000000000..33e899f2e --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_delete_time_series_group.md @@ -0,0 +1,39 @@ + + +### 功能描述 + +删除一个自定义时序分组 +给定一个自定义时序分组ID,删除之 + + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| -------------- | ------ | ---- | ----------- | +| time_series_group_id | int | 是 | 自定义时序分组ID | +| operator | string | 是 | 操作者 | + +#### 请求示例 + +```json +{ + "time_series_group_id": 123, + "operator": "admin" +} +``` + +### 返回结果 + +#### 结果示例 + +```json +{ + "message":"OK", + "code":"0", + "data": { }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_get_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_get_time_series_group.md new file mode 100644 index 000000000..73c7c20e0 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_get_time_series_group.md @@ -0,0 +1,112 @@ + + +### 功能描述 + +查询一个自定义时序分组ID +给定一个数据源和业务, 查询器具体的信息 + + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| -------------- | ------ | ---- | ----------- | +| time_series_group_id | int | 是 | 自定义时序分组ID | +| with_result_table_info | bool | 否 | 自定义时序分组存储信息 | + + +#### 请求示例 + +```json +{ + "time_series_group_id": 123, + "with_result_table_info": true +} +``` + +### 返回结果 + +#### 字段说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| bk\_time_series_group_id | int | 自定义时序分组ID | +| bk\_data_id | int | 数据源ID | +| bk\_biz_id | int | 业务ID | +| time_series\_group_name | string | 自定义时序分组名 | +| label | string | 自定义时序标签 | +| is_enable | bool | 是否启用 | +| creator | string | 创建者 | +| create_time | string | 创建时间 | +| last_modify_user | string | 最后修改者 | +| last_modify_time | string | 最后修改时间 | +| metric_info_list | array | Metric列表 | +| shipper_list | object | 结果表配置信息 | + +#### metric_info_list具体内容说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| field_id | int | Field ID | +| field_name | string | Field 名 | +| tag_list | array | 维度列表, 元素为维度明 | + + + +#### 结果示例 + +```json +{ + "message":"OK", + "code":"0", + "data": { + "time_series_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "time_series_group_name": "自定义时序分组名", + "label": "application", + "is_enable": true, + "creator": "admin", + "create_time": "2019-10-10 10:10:10", + "last_modify_user": "admin", + "last_modify_time": "2020-10-10 10:10:10", + "metric_info_list": [{ + "field_name": "mem_usage", + "description": "mem_usage_2", + "unit": "M", + "type": "double", + "tag_list": [ + { + "field_name": "test_name", + "description": "test_name_2", + "unit": "M", + "type": "double", + } + ] + },{ + "field_name": "cpu_usage", + "description": "mem_usage_2", + "unit": "M", + "type": "double", + "tag_list": [ + { + "field_name": "test_name", + "description": "test_name_2", + "unit": "M", + "type": "double", + } + ] + }], + "shipper_list": [{ + "cluster_info": { + "domain_name": "es.service.consul", + "port": 8000 + }, + "cluster_type": "es" + }] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_list_transfer_cluster.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_list_transfer_cluster.md new file mode 100644 index 000000000..f60ad4918 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_list_transfer_cluster.md @@ -0,0 +1,39 @@ +### 功能描述 + +获取所有transfer集群信息 + + +{{ common_args_desc }} + +#### 接口参数 + +无请求参数 + +#### 请求示例 + +```json +{ + +} +``` + +### 返回结果 + +#### 结果示例 + +```json +{ + "message": "OK", + "code": "0", + "data": [ + { + "cluster_id": "default" + }, + { + "cluster_id": "bkmonitorv3-na" + } + ], + "result": true, + "request_id": "408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_data_id.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_data_id.md index 4ecd9d382..fa61ab579 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_data_id.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_data_id.md @@ -15,7 +15,9 @@ | data_id | int | 是 | 数据源ID | | operator | string | 是 | 操作者 | | source_label | string | 是 | 数据来源标签,例如:数据平台(bk_data),监控采集器(bk_monitor_collector) | -| type_label | string | 是 | 数据类型标签,例如:时序数据(time_series),事件数据(event),日志数据(log) | +| type_label | string | 是 | 数据类型标签,例如:时序数据(time_series),事件数据(event),日志数据(log) | +| option | string | 否 | 数据源配置选项内容,格式为{`option_name`: `option_value`} | +| is_enable | bool | 否 | 数据源是否启用 | **注意**: 上述的`source_tag`及`data_type`都应该通过`metadata_get_label`接口获取,不应该自行创建 diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_time_series_group.md new file mode 100644 index 000000000..fc5266e43 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_modify_time_series_group.md @@ -0,0 +1,73 @@ + + +### 功能描述 + +修改一个自定义时序分组ID +给定一个自定义时序分组ID,修改某些具体的信息 + + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| -------------- | ------ | ---- | ----------- | +| time_series_group_id | int | 是 | 自定义时序组ID | +| time_series_group_name | string | 是 | 自定义时序分组名 | +| label | string | 否 | 事件分组标签,用于表示自定义时序监控对象,应该复用【result_table_label】类型下的标签 | +| operator | string | 否 | 操作者 | +| metric_info_list | bool | 否 | 自定义时序列表 | +| is_enable | bool | 否 | 是否停用自定义时序组 | + +#### 请求示例 + +```json +{ + "time_series_group_id": 123, + "time_series_group_name": "自定义时序开发", + "operator": "system", + "description": "what the group use for.", + "is_enable": true, + "field_list": [{ + "filed_name": "usage", + "field_type": "double", + "description": "field description", + "tag": "metric", + "alias_name": "usage_alias", + "option": [], + "is_config_by_user": true + }] +} +``` + +### 返回结果 + +#### 字段说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| time_series_group_id | int | 自定义时序分组ID | + + +#### 结果示例 + +```json +{ + "message":"OK", + "code":"0", + "data": { + "time_series_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "label": "application", + "description": "use for what?", + "is_enable": true, + "creator": "admin", + "create_time": "2019-10-10 10:10:10", + "last_modify_user": "admin", + "last_modify_time": "2020-10-10 10:10:10" + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_tag_values.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_tag_values.md new file mode 100644 index 000000000..4708d8110 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_tag_values.md @@ -0,0 +1,48 @@ + + +### 功能描述 + +查询数据源指定指定tag/dimension的可选值 + + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| -------------- | ------ | ---- | ----------- | +| table_id | string | 是 | 结果ID | +| tag_name | string | 是 | tag/dimension字段名 | + + +#### 请求示例 + +```json +{ + "table_id": "2_bkmonitor_time_series_1500514.base", + "tag_name": "target" +} +``` + +### 返回结果 + +#### 字段说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| tag_values | array | tag/dimension的值 | + + +#### 结果示例 + +```json +{ + "message":"OK", + "code":"0", + "data": { + "tag_values": ["target1", "target2"] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_time_series_group.md new file mode 100644 index 000000000..feb2f01c6 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/metadata_query_time_series_group.md @@ -0,0 +1,114 @@ + + +### 功能描述 + +批量查询自定义时序分组信息 + + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| -------------- | ------ | ---- | ----------- | +| label | string | 否 | 自定义时序分组标签(监控对象) | +| time_series_group_name | string | 否 | 自定义时序分组名称 | +| bk_biz_id | int | 否 | 业务ID | + + +#### 请求示例 + +```json +{ + "label": "application", + "time_series_group_name": "自定义时序分组名", + "bk_biz_id": 123 +} +``` + +### 返回结果 + +#### 字段说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| time_series_group_id | int | 自定义时序分组ID | +| bk\_data_id | int | 数据源ID | +| bk\_biz_id | int | 业务ID | +| time_series_group_name | string | 自定义时序分组名 | +| label | string | 自定义时序标签 | +| is_enable | bool | 是否启用 | +| creator | string | 创建者 | +| create_time | string | 创建时间 | +| last_modify_user | string | 最后修改者 | +| last_modify_time | string | 最后修改时间 | +| metric_info_list | array | 自定义时序列表 | + +#### metric_info_list具体内容说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| field_name | string | 字段名 | +| description | string | 字段描述 | +| unit | string | 单位 | +| type | string | 字段类型 | +| tag_list | array | 维度列表 | + +#### metric_info_list.tag_list具体内容说明 + +| 字段 | 类型 | 描述 | +| ------------------- | ------ | -------- | +| field_name | string | 字段名 | +| description | string | 字段描述 | +| unit | string | 单位 | +| type | string | 字段类型 | + +#### 结果示例 + +```json +{ + "message":"OK", + "code":"0", + "data": [{ + "time_series_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "time_series_group_name": "自定义时序分组名", + "label": "application", + "is_enable": true, + "creator": "admin", + "create_time": "2019-10-10 10:10:10", + "last_modify_user": "admin", + "last_modify_time": "2020-10-10 10:10:10", + "metric_info_list": [{ + "field_name": "mem_usage", + "description": "mem_usage_2", + "unit": "M", + "type": "double", + "tag_list": [ + { + "field_name": "test_name", + "description": "test_name_2", + "unit": "M", + "type": "double", + } + ] + },{ + "field_name": "cpu_usage", + "description": "mem_usage_2", + "unit": "M", + "type": "double", + "tag_list": [ + { + "field_name": "test_name", + "description": "test_name_2", + "unit": "M", + "type": "double", + } + ] + }] + }], + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy.md index 5924d073c..d38c87692 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy.md @@ -11,11 +11,11 @@ | 字段 | 类型 | 必选 | 描述 | | :---------- | ------ | ---- | ---------------- | | action_list | list | 是 | 动作列表(Action) | -| target | list | 是 | 监控目标 | | bk_biz_id | int | 是 | 业务ID | | item_list | list | 是 | 监控项(Item) | | name | string | 是 | 策略名称 | | scenario | string | 是 | 监控对象 | +| is_enabled | string | 否 | 是否开启,默认开启| #### NoticeAction @@ -62,6 +62,7 @@ action目前只有通知类型,创建策略时,如果传入通知组的ID | no_data_config.is_enabled | bool | 是 | 是否开启无数据告警 | | no_data_config.continous | int | 否 | 无数据告警检测周期数 | | data_type_label | string | 是 | 数据类型 | +| target | list | 是 | 监控目标 | #### RtQueryConfig @@ -169,12 +170,12 @@ action目前只有通知类型,创建策略时,如果传入通知组的ID "data_source_label":"bk_monitor", "algorithm_list":[ { - "algorithm_config":[ + "algorithm_config":[[ { "threshold":0.1, "method":"gte" } - ], + ]], "level":1, "trigger_config":{ "count":1, @@ -192,23 +193,22 @@ action目前只有通知类型,创建策略时,如果传入通知组的ID "continuous":5 }, "data_type_label":"time_series", - "name":"\u7a7a\u95f2\u7387" - } - ], - "target":[ - [ - { - "field":"ip", - "method":"eq", - "value":[ + "name":"\u7a7a\u95f2\u7387", + "target":[ + [ { - "ip":"127.0.0.1", - "bk_cloud_id":0, - "bk_supplier_id":0 - }, + "field":"bk_target_ip", + "method":"eq", + "value":[ + { + "ip":"127.0.0.1", + "bk_cloud_id":0 + } + ] + } ] - } - ] + ] + } ], "scenario":"os", "action_list":[ diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md new file mode 100644 index 000000000..cbb9e57a7 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md @@ -0,0 +1,463 @@ +### 功能描述 + +保存告警策略 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 +| 字段 | 类型 | 必选 | 描述 | +| :--------- | ------- | ---- | -------------------- | +| actions | list | 是 | 动作列表(Action) | +| bk_biz_id | int | 是 | 业务ID | +| detects | list | 是 | 检测配置列表(Detect) | +| id | int | 是 | 策略ID | +| items | list | 是 | 监控项表(Item) | +| labels | list | 是 | 策略标签列表 | +| name | string | 是 | 策略名称 | +| scenario | string | 是 | 监控对象 | +| source | string | 是 | 监控源 | +| is_enabled | boolean | 否 | 是否开启,默认开启 | + +#### Action + +| 字段 | 类型 | 必选 | 描述 | +| --------------------------------- | ------ | ---- | ---------------- | +| id | int | 是 | 动作id | +| type | string | 是 | 动作类型(notice) | +| config | dict | 是 | 动作配置 | +| config.alarm_end_time | string | 是 | 通知时间段 | +| config.alarm_start_time | string | 是 | 通知时间段 | +| config.send_recovery_alarm | bool | 是 | 是否发送恢复 | +| config.alarm_interval | int | 是 | 通知间隔 | +| notice_template | dict | 否 | 通知配置 | +| notice_template.anomaly_template | string | 否 | 异常通知模板 | +| notice_template.recovery_template | string | 否 | 恢复通知模板 | +| notice_group_ids | list | 是 | 通知组ID列表 | + +#### Detect + +| 字段 | 类型 | 必选 | 描述 | +| ---------------------------- | ------ | ---- | ---------------- | +| id | int | 是 | 检测id | +| level | int | 是 | 告警级别 | +| expression | string | 是 | 计算公式 | +| trigger_config | dict | 是 | 触发条件配置 | +| trigger_config.count | int | 是 | 触发次数 | +| trigger_config.check_window | int | 是 | 触发周期 | +| recovery_config | dict | 是 | 恢复条件配置 | +| recovery_config.check_window | int | 是 | 恢复周期 | +| connector | string | 是 | 同级别算法连接符 | + +#### Item + +| 字段 | 类型 | 必选 | 描述 | +| ---------------------------- | ------ | ---- | ------------------------- | +| query_configs | list | 是 | 指标查询配置(QueryConfig) | +| id | string | 是 | 监控项配置id | +| name | string | 是 | 监控项名称 | +| expression | string | 是 | 计算公式 | +| origin_sql | string | 是 | 源sql | +| algorithms | list | 是 | 算法配置列表(Algorithm) | +| no_data_config | dict | 是 | 无数据配置 | +| no_data_config.is_enabled | bool | 是 | 是否开启无数据告警 | +| no_data_config.continuous | int | 否 | 无数据告警检测周期数 | +| target | list | 是 | 监控目标 | + +#### Target + +| 字段 | 类型 | 必选 | 描述 | +| ---------------------------- | ------ | ---- | ----------------------- | +| field | string | 是 | 监控目标类型 | +| value | dict | 是 | 监控目标数据项 | +| method | string | 是 | 监控目标方法 | + +field - 根据目标节点类型和目标对象类型组合 +host_target_ip +host_ip +host_topo +service_topo +service_service_template +service_set_template +host_service_template +host_set_template + +```json +{ + "target": [ + [ + { + "field": "host_topo_node", + "method": "eq", + "value": [ + { + "bk_inst_id": 7, + "bk_obj_id": "biz" + } + ] + } + ] + ] +} +``` + +#### QueryConfig + +| 字段 | 类型 | 必选 | 描述 | +| ----------------- | ------ | ---- | ------------ | +| alias | string | 是 | 别名 | +| data_source_label | string | 是 | 数据源标签 | +| data_type_label | string | 是 | 数据类型标签 | + +##### BkMonitorTimeSeries类型 + +```json +{ + "data_source_label": "bk_monitor", + "data_type_label": "time_series" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| metric_field | string | 是 | 指标 | +| unit | string | 是 | 单位 | +| agg_condition | list | 是 | 查询条件 | +| agg_dimension | list | 是 | 聚合维度 | +| agg_method | string | 是 | 聚合方法 | +| agg_interval | int | 是 | 聚合周期 | +| result_table_id | string | 是 | 结果表ID | + +##### BkMonitorLog类型 + +```json +{ + "data_source_label": "bk_monitor", + "data_type_label": "log" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| agg_method | string | 是 | 聚合方法 | +| agg_condition | list | 是 | 查询条件 | +| result_table_id | string | 是 | 结果表 | +| agg_interval | int | 是 | 聚合周期 | + +##### BkMonitorEvent类型 + +```json +{ + "data_source_label": "bk_monitor", + "data_type_label": "event" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| metric_field | string | 是 | 指标 | +| agg_condition | list | 是 | 查询条件 | +| result_table_id | string | 是 | 结果表 | + +##### BkLogSearchTimeSeries类型 + +```json +{ + "data_source_label": "bk_log_search", + "data_type_label": "time_series" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| metric_field | string | 是 | 指标 | +| index_set_id | int | 是 | 索引集ID | +| agg_condition | list | 是 | 查询条件 | +| agg_dimension | list | 是 | 聚合维度 | +| agg_method | string | 是 | 聚合方法 | +| result_table_id | string | 是 | 索引 | +| agg_interval | int | 是 | 聚合周期 | +| time_field | string | 是 | 时间字段 | +| unit | string | 是 | 单位 | + +##### BkLogSearchLog类型 + +```json +{ + "data_source_label": "bk_log_search", + "data_type_label": "log" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| index_set_id | int | 是 | 索引集ID | +| agg_condition | list | 是 | 查询条件 | +| query_string | int | 是 | 查询语句 | +| agg_dimension | list | 是 | 聚合维度 | +| result_table_id | string | 是 | 索引 | +| agg_interval | int | 是 | 聚合周期 | +| time_field | string | 是 | 时间字段 | + +##### CustomEvent类型 + +```json +{ + "data_source_label": "custom", + "data_type_label": "event" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| ----------------- | ------ | ---- | -------------- | +| custom_event_name | string | 是 | 自定义事件名称 | +| agg_condition | list | 是 | 查询条件 | +| agg_interval | int | 是 | 聚合周期 | +| agg_dimension | list | 是 | 查询维度 | +| agg_method | string | 是 | 聚合方法 | +| result_table_id | string | 是 | 结果表ID | + +##### CustomTimeSeries类型 + +```json +{ + "data_source_label": "custom", + "data_type_label": "time_series" +} +``` + | 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| metric_field | string | 是 | 指标 | +| unit | string | 是 | 单位 | +| agg_condition | list | 是 | 查询条件 | +| agg_dimension | list | 是 | 聚合维度 | +| agg_method | string | 是 | 聚合方法 | +| agg_interval | int | 是 | 聚合周期 | +| result_table_id | string | 是 | 结果表ID | + +##### BkDataTimeSeries类型 + +```json +{ + "data_source_label": "bk_data", + "data_type_label": "time_series" +} +``` + +| 字段 | 类型 | 必选 | 描述 | +| --------------- | ------ | ---- | -------- | +| metric_field | string | 是 | 指标 | +| unit | string | 是 | 单位 | +| agg_condition | list | 是 | 查询条件 | +| agg_dimension | list | 是 | 聚合维度 | +| agg_method | string | 是 | 聚合方法 | +| agg_interval | int | 是 | 聚合周期 | +| result_table_id | string | 是 | 结果表 | +| time_field | string | 是 | 时间字段 | + + + +#### Algorithm + +| 字段 | 类型 | 必选 | 描述 | +| ----------- | ------ | ---- | ------------ | +| config | list | 是 | 算法配置列表 | +| level | int | 是 | 告警级别 | +| type | string | 是 | 算法类型 | +| unit_prefix | string | 否 | 算法单位前缀 | + +#### 算法配置config + +##### 静态阈值Threshold + +```json +[ + { + "method": "gt", // gt,gte,lt,lte,eq,neq + "threshold": "1" + } +] +``` + +##### 简单环比SimpleRingRatio + +```json +{ + "floor": "1", + "ceil": "1" +} +``` + +##### 简单同比SimpleYearRound + +```json +{ + "floor": "1", + "ceil": "1" +} +``` + +##### 高级环比AdvancedRingRatio + +```json +{ + "floor": "1", + "ceil": "1", + "floor_interval": 1, + "ceil_interval": 1 +} +``` + +##### 高级同比AdvancedYearRound + +与高级环比检测算法配置格式一致 + +##### 智能异常检测IntelligentDetect + +```json +{ + "sensitivity_value": 1 // 0-100 + "anomaly_detect_direct": "ceil" // "ceil", "floor", "all"(default) +} +``` + +##### 同比振幅YearRoundAmplitude + +```json +{ + "ratio": 1, + "shock": 1, + "days": 1, + "method": "gte" // gt,gte,lt,lte,eq,neq +} +``` + +##### 同比区间YearRoundRange + +与同比振幅配置格式一致 + +##### 环比振幅RingRatioAmplitude + +```json +{ + "ratio": 1, + "shock": 1, + "days": 1, + "threshold": 1 +} +``` + +#### 示例数据 + +```json +{ + "bk_biz_id": 7, + "scenario": "host_process", + "name": "进程端口", + "labels": [], + "is_enabled": true, + "items": [ + { + "name": "进程端口", + "no_data_config": { + "continuous": 5, + "is_enabled": false, + "agg_dimension": [] + }, + "target": [ + [ + { + "field": "host_topo_node", + "method": "eq", + "value": [ + { + "bk_inst_id": 7, + "bk_obj_id": "biz" + } + ] + } + ] + ], + "expression": "", + "origin_sql": "", + "query_configs": [ + { + "data_source_label": "bk_monitor", + "data_type_label": "event", + "alias": "A", + "result_table_id": "system.event", + "agg_method": "REAL_TIME", + "agg_dimension": [], + "agg_condition": [], + "metric_field": "proc_port", + "unit": "", + "query_string": "*", + "custom_event_name": "proc_port" + } + ], + "algorithms": [ + { + "level": 2, + "type": "", + "config": [], + "unit_prefix": "" + } + ] + } + ], + "detects": [ + { + "level": 2, + "expression": "", + "trigger_config": { + "count": 1, + "check_window": 5 + }, + "recovery_config": { + "check_window": 5 + }, + "connector": "and" + } + ], + "actions": [ + { + "type": "notice", + "config": { + "alarm_start_time": "00:00:00", + "alarm_end_time": "23:59:59", + "alarm_interval": 1440, + "send_recovery_alarm": false + }, + "notice_group_ids": [ + 11 + ], + "notice_template": { + "anomaly_template": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "recovery_template": "" + } + } + ], + "id": 36 +} +``` + +### 响应参数 + +data返回保存的策略结构,与请求参数一致(示例数据中省略) + +#### 示例数据 + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": {} +} +``` + + + + + diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_notice_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_notice_group.md index ecea602a3..6a8080889 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_notice_group.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_notice_group.md @@ -17,6 +17,7 @@ | notice_way | dict | 是 | 各个级别的通知方式 | | id | int | 否 | 告警组ID,如果没有则创建 | | notice_receiver | list | 是 | 通知对象列表 | +| wxwork_group | dict | 否 | 企业微信机器人 | #### notice_receiver - 通知对象列表 @@ -61,7 +62,12 @@ }, "webhook_url": "https://www.qq.com", "message": "测试通知", - "id": 1 + "id": 1, + "wxwork_group": { + "1": "群会话ID", + "2": "群会话ID", + "3": "群会话ID" + } } ``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy.md index d93695881..9a3aff777 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy.md @@ -125,12 +125,12 @@ "data_source_label": "bk_monitor", "algorithm_list": [ { - "algorithm_config": [ + "algorithm_config": [[ { "threshold": 0.1, "method": "gte" } - ], + ]], "update_time": "2019-11-22 14:50:23+0800", "trigger_config": { "count": 1, diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md new file mode 100644 index 000000000..10fc27306 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md @@ -0,0 +1,254 @@ +### 功能描述 + +查询告警策略列表 + +### 接口参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +| --------- | ------ | ---- | ---------- | +| page | int | 是 | 页码 | +| page_size | int | 是 | 每页条数 | +| conditions| list | 是 | 查询条件 | +| bk_biz_id | int | 是 | 业务ID | +| scenario | char | 否 | 监控场景 | +| with_notice_group | Boolean | 是 | 是否补充通知组信息 | + +#### 示例数据 + +```json +{ + "page": 1, + "page_size": 10, + "conditions": [ + { + "key": "strategy_id", + "value": [ + "36" + ] + } + ], + "bk_biz_id": 7, + "with_notice_group": false +} +``` + +### 响应参数 + +| 字段 | 类型 | 描述 | +| :---------- | ------ | ---------------- | +| data_source_list | list | 数据源列表(DataSource) | +| notice_group_list | list | 通知组列表(NoticeGroup) | +| scenario_list | list | 监控对象列表(Scenario) | +| strategy_config_list | int | 策略配置列表(StrategyConfig)| +| strategy_label_list | list | 策略标签列表(StrategyLabel) | + +#### DataSource + +| 字段 | 类型 | 描述 | +| --------------------------------- | ------ | ----------------------- | +| type | string | 数据类型 | +| name | string | 数据名称 | +| data_type_label | string | 数据类型标签 | +| data_source_label| string | 数据源标签 | +| count | int | 按数据源统计策略数量 | + + +#### NoticeGroup + +| 字段 | 类型 | 描述 | +| --------------- | ------ | ------------- | +| notice_group_id | list | 通知组ID | +| notice_group_name| dict | 通知组名称 | +| count | int | 按通知组统计的策略数量 | + +#### Scenario + +| 字段 | 类型 | 描述 | +| ------------------------- | ------ | --------------------------- | +| id | dict | 监控对象ID | +| display_name | string | 监控对象名称 | +| count | string | 按监控对象统计的策略数量 | + +#### StrategyConfig +| 字段 | 类型 | 必选 | 描述 | +| :---------------------- | ------- | ---- | ------------ | +| actions | list | 是 | 动作列表 | +| source | string | 是 | 策略来源 | +| detects | list | 是 | 检测配置列表 | +| id | int | 是 | 策略ID | +| items | list | 是 | 监控项表 | +| labels | list | 是 | 策略标签列表 | +| name | string | 是 | 策略名称 | +| scenario | string | 是 | 监控对象 | +| is_enabled | Boolean | 否 | 是否开启 | +| update_time | string | 否 | 创建策略时间 | +| create_time | string | 否 | 创建策略时间 | +| update_user | string | 否 | 创建策略者 | +| create_user | string | 否 | 创建策略者 | +| alert_count | int | 否 | 告警次数 | +| type | string | 否 | 策略类型 | +| target_object_type | string | 否 | 目标对象类型 | +| shield_info | dict | 否 | 屏蔽配置信息 | +| shield_info.is_shielded | Boolean | 否 | 是否屏蔽 | +| add_allowed | Boolean | 否 | 允许添加 | +| data_source_type | string | 否 | 数据源类型 | +| bk_biz_id | int | 是 | 业务ID | + + +#### StrategyLabel + +| 字段 | 类型 | 描述 | +| --------------- | ------ | -------- | +| label_name | string | 策略标签名称 | +| id | int | 策略标签ID | +| count | string | 按策略标签统计的策略数量 | + +#### 示例数据 + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": { + "scenario_list": [ + { + "id": "application_check", + "display_name": "业务应用", + "count": 0 + } + ], + "strategy_config_list": [ + { + "id": 36, + "version": "v2", + "bk_biz_id": 7, + "name": "进程端口", + "source": "bk_monitorv3", + "scenario": "host_process", + "type": "monitor", + "items": [ + { + "id": 36, + "name": "进程端口", + "no_data_config": { + "level": 2, + "continuous": 5, + "is_enabled": false, + "agg_dimension": [] + }, + "target": [ + [ + { + "field": "host_topo_node", + "value": [ + { + "bk_obj_id": "biz", + "bk_inst_id": 7 + } + ], + "method": "eq" + } + ] + ], + "expression": "", + "origin_sql": "", + "query_configs": [ + { + "data_source_label": "bk_monitor", + "data_type_label": "event", + "alias": "A", + "metric_id": "bk_monitor.proc_port", + "id": 36, + "functions": [], + "result_table_id": "system.event", + "metric_field": "proc_port", + "agg_condition": [], + "name": "进程端口" + } + ], + "algorithms": [ + { + "id": 36, + "type": "ProcPort", + "level": 2, + "config": [], + "unit_prefix": "" + } + ] + } + ], + "detects": [ + { + "id": 36, + "level": 2, + "expression": "", + "trigger_config": { + "count": 1, + "check_window": 5 + }, + "recovery_config": { + "check_window": 5, + "status_setter": "recovery" + }, + "connector": "and" + } + ], + "actions": [ + { + "id": 36, + "type": "notice", + "config": { + "alarm_start_time": "00:00:00", + "alarm_end_time": "23:59:59", + "alarm_interval": 1440, + "send_recovery_alarm": false + }, + "notice_group_ids": [ + 11 + ], + "notice_template": { + "anomaly_template": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "recovery_template": "" + } + } + ], + "is_enabled": true, + "update_time": "2021-08-11T15:36:58.508375+08:00", + "update_user": "admin", + "create_time": "2021-07-21T13:17:31.539288+08:00", + "create_user": "admin", + "labels": [], + "alert_count": 0, + "shield_info": { + "is_shielded": false + }, + "target_object_type": "HOST", + "add_allowed": true, + "data_source_type": "系统事件" + } + ], + "notice_group_list": [ + { + "notice_group_id": 11, + "notice_group_name": "主备负责人", + "count": 1 + } + ], + "data_source_list": [ + { + "type": "bk_monitor_time_series", + "name": "监控采集指标", + "data_type_label": "time_series", + "data_source_label": "bk_monitor", + "count": 1 + } + ], + "strategy_label_list": [] + } +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_event.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_event.md index 237690a93..f4be28268 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_event.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_event.md @@ -14,6 +14,8 @@ | time_range | string | 否 | 事件结束的时间范围,格式为:2020-02-26 00:00:00 -- 2020-02-28 23:59:59 | | days | int | 否 | 查询最近几天内的时间,这个参数存在,time_range则失效 | | conditions | list | 否 | 查询条件 | +| page | int | 否 | 第几页,不传则不分页 | +| page_size | int | 否 | 每页数量,默认100 | > 需要注意的是,当前未恢复的事件不受时间条件的约束,也就是无论选择什么时间范围,当前的未恢复的事件都会被查出来,除非使用conditions进行事件状态过滤。 @@ -86,7 +88,9 @@ conditions用于按事件相关的其他字段过滤事件,由key,value组成 "bk_monitor|time_series" ] } - ] + ], + "page": 1, + "page_size": 100 } ``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/update_partial_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/update_partial_strategy_v2.md new file mode 100644 index 000000000..9530bdd94 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/update_partial_strategy_v2.md @@ -0,0 +1,60 @@ +### 功能描述 + +批量更新策略局部配置 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 +| 字段 | 类型 | 必选 | 描述 | +| :-------- | ---- | ---- | -------------- | +| edit_data | dict | 是 | 待修改数据 | +| ids | int | 是 | 策略ID列表 | +| bk_biz_id | int | 是 | 业务ID | + +####edit_data +| 字段 | 类型 | 描述 | +| :------------------ | ------- | ---------- | +| is_enabled | boolean | 启用状态 | +| notice_group_list | list | 告警组配置 | +| labels | list | 策略标签 | +| trigger_config | dict | 触发条件 | +| recovery_config | dict | 恢复条件 | +| alarm_interval | int | 通知间隔 | +| send_recovery_alarm | bool | 恢复通知 | +| message_template | string | 通知模板 | +| no_data_config | dict | 无数据配置 | +| target | list | 监控目标 | +#### 示例数据 + +```json +{ + "ids": [ + 23121 + ], + "edit_data": { + "notice_group_list": [ + 4644 + ] + }, + "bk_biz_id": 883 +} +``` + +### 响应参数 + +data返回更新成功的策略id表 + +#### 示例数据 + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": [ + 23121 + ] +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml index 0b077ff22..d6e393187 100644 --- a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml +++ b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml @@ -267,6 +267,123 @@ name: get_uptime_check_node_list path: /v2/monitor_v3/get_uptime_check_node_list/ suggest_method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/models/uptime_check_node/{node_id}/ + is_hidden: true + label: 获取拨测节点信息 + label_en: uptime_check_node_info + name: uptime_check_node_info + path: /v2/monitor_v3/uptime_check_node_info/ + suggest_method: GET +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_node/edit/ + is_hidden: true + label: 编辑拨测节点信息 + label_en: edit_uptime_check_node + name: edit_uptime_check_node + path: /v2/monitor_v3/edit_uptime_check_node/ + suggest_method: POST +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_node/delete/ + is_hidden: true + label: 删除拨测节点 + label_en: delete_uptime_check_node + name: delete_uptime_check_node + path: /v2/monitor_v3/delete_uptime_check_node/ + suggest_method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_node/add/ + is_hidden: true + label: 创建拨测节点 + label_en: create_uptime_check_node + name: create_uptime_check_node + path: /v2/monitor_v3/create_uptime_check_node/ + suggest_method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/models/uptime_check_task/{task_id}/ + is_hidden: true + label: 获取拨测任务信息 + label_en: uptime_check_task_info + name: uptime_check_task_info + path: /v2/monitor_v3/uptime_check_task_info/ + suggest_method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_task/add/ + is_hidden: true + label: 创建拨测任务 + label_en: create_uptime_check_task + name: create_uptime_check_task + path: /v2/monitor_v3/create_uptime_check_task/ + suggest_method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_task/edit/ + is_hidden: true + label: 编辑拨测任务信息 + label_en: edit_uptime_check_task + name: edit_uptime_check_task + path: /v2/monitor_v3/edit_uptime_check_task/ + suggest_method: POST +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_task/delete/ + is_hidden: true + label: 删除拨测任务 + label_en: delete_uptime_check_task + name: delete_uptime_check_task + path: /v2/monitor_v3/delete_uptime_check_task/ + suggest_method: POST +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_task/test/ + is_hidden: true + label: 测试连通性 + label_en: test_uptime_check_task + name: test_uptime_check_task + path: /v2/monitor_v3/test_uptime_check_task/ + suggest_method: POST +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_task/deploy/ + is_hidden: true + label: 下发拨测任务 + label_en: deploy_uptime_check_task + name: deploy_uptime_check_task + path: /v2/monitor_v3/deploy_uptime_check_task/ + suggest_method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/models/uptime_check_task/change_status/ + is_hidden: true + label: 启停拨测任务 + label_en: change_uptime_check_task_status + name: change_uptime_check_task_status + path: /v2/monitor_v3/change_uptime_check_task_status/ + suggest_method: POST + - api_type: query comp_codename: generic.v2.monitor_v3.monitor_v3_component dest_http_method: GET @@ -387,6 +504,16 @@ name: search_event path: /v2/monitor_v3/search_event/ suggest_method: POST +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/event/ack_event/ + is_hidden: true + label: 告警事件确认 + label_en: ack_event + name: ack_event + path: /v2/monitor_v3/ack_event/ + suggest_method: POST - api_type: query comp_codename: generic.v2.monitor_v3.monitor_v3_component dest_http_method: POST @@ -779,4 +906,181 @@ label_en: null name: metadata_list_transfer_cluster path: /v2/monitor_v3/metadata_list_transfer_cluster/ - method: GET \ No newline at end of file + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/collector_plugin/ + is_hidden: true + label: 采集插件列表 + label_en: collector_plugin_list + name: collector_plugin_list + path: /v2/monitor_v3/collector_plugin_list/ + suggest_method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/collector_plugin/{plugin_id}/ + is_hidden: true + label: 获取采集插件详情 + label_en: collector_plugin_detail + name: collector_plugin_detail + path: /v2/monitor_v3/collector_plugin_detail/ + suggest_method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/mail_report/get_statistics_by_json/ + is_hidden: true + label: 查询运营数据 + label_en: null + name: get_statistics_by_json + path: /v2/monitor_v3/get_statistics_by_json/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/mail_report/test_report_mail/ + is_hidden: true + label: 订阅报表测试 + label_en: null + name: test_report_mail + path: /v2/monitor_v3/test_report_mail/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/mail_report/group_list/ + is_hidden: true + label: 查询组内人员 + label_en: null + name: group_list + path: /v2/monitor_v3/group_list/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/mail_report/is_superuser/ + is_hidden: true + label: 判断用户是否超级管理员 + label_en: null + name: is_superuser + path: /v2/monitor_v3/is_superuser/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/mail_report/get_setting_and_notify_group/ + is_hidden: true + label: 获取配置管理员及其业务、告警接收人及其业务 + label_en: null + name: get_setting_and_notify_group + path: /v2/monitor_v3/get_setting_and_notify_group/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/query/permission/ + is_hidden: true + label: 获取用户拥有给定权限的业务列表 + label_en: business_list_by_actions + name: business_list_by_actions + path: /v2/monitor_v3/business_list_by_actions/ + suggest_method: POST + + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/collector_plugin/delete/ + is_hidden: true + label: 删除插件 + label_en: collector_plugin_delete + name: collector_plugin_delete + path: /v2/monitor_v3/collector_plugin_delete/ + suggest_method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/plugin_upgrade_info/search/ + is_hidden: true + label: 获取插件升级日志 + label_en: plugin_upgrade_info + name: plugin_upgrade_info + path: /v2/monitor_v3/collector_plugin_upgrade_info/ + suggest_method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/meta/check_or_create_kafka_storage/ + is_hidden: true + label: 创建实时监控表对应的kafka存储 + label_en: check or create kafka storage + name: check_or_create_kafka_storage + path: /v2/monitor_v3/check_or_create_kafka_storage/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/base/remote_call/ + is_hidden: true + label: 远程调用 + label_en: remote_call + name: remote_call + path: /v2/monitor_v3/remote_call/ + suggest_method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/alarm_strategy_v2/search/ + is_hidden: false + label: 查询告警策略 + label_en: search alarm strategy + name: search_alarm_strategy_v2 + path: /v2/monitor_v3/search_alarm_strategy_v2/ + suggest_method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/alarm_strategy_v2/save/ + is_hidden: false + label: 保存告警策略 + label_en: save alarm strategy + name: save_alarm_strategy_v2 + path: /v2/monitor_v3/save_alarm_strategy_v2/ + suggest_method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/alarm_strategy_v2/delete/ + is_hidden: false + label: 删除告警策略 + label_en: delete alarm strategy + name: delete_alarm_strategy_v2 + path: /v2/monitor_v3/delete_alarm_strategy_v2/ + suggest_method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/alarm_strategy_v2/update_bulk/ + is_hidden: true + label: 批量更新策略局部配置 + label_en: update partial strategy + name: update_partial_strategy_v2 + path: /v2/monitor_v3/update_partial_strategy_v2/ + suggest_method: POST \ No newline at end of file From a84f3bad9954a5b67e01a359480ede2f057b1096 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Fri, 8 Oct 2021 17:29:24 +0800 Subject: [PATCH 2/6] update release doc --- paas2/VERSION | 2 +- paas2/release.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/paas2/VERSION b/paas2/VERSION index 03aa22f5d..b221cd1cf 100644 --- a/paas2/VERSION +++ b/paas2/VERSION @@ -1 +1 @@ -2.12.25 +2.12.26 diff --git a/paas2/release.md b/paas2/release.md index ffe0155c1..7a458c78f 100644 --- a/paas2/release.md +++ b/paas2/release.md @@ -1,5 +1,8 @@ Release Log =============================== +# 2.12.26 + - update: esb update monitor_v3/jobv3/itsm/iam/cc confapis + # 2.12.25 - update: esb udpate cc confapis to cc 3.9 From ffdd40678d4acc1faa52df50c583169c8fdde137 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Sat, 9 Oct 2021 09:40:40 +0800 Subject: [PATCH 3/6] add mgmt_api for iam --- .../esb/components/confapis/iam/mgmt_api.yaml | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 paas2/esb/components/confapis/iam/mgmt_api.yaml diff --git a/paas2/esb/components/confapis/iam/mgmt_api.yaml b/paas2/esb/components/confapis/iam/mgmt_api.yaml new file mode 100644 index 000000000..177db5fb8 --- /dev/null +++ b/paas2/esb/components/confapis/iam/mgmt_api.yaml @@ -0,0 +1,166 @@ +--- + +- path: /v2/iam/management/grade_managers/ + name: mgmt_api_create_grade_manager + label: 创建分级管理员 + label_en: mgmt api create grade manager + suggest_method: POST + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/grade_managers/ + dest_http_method: POST + is_hidden: true + +- path: /v2/iam/management/grade_managers/{grade_manager_id}/members/ + name: mgmt_api_list_grade_manager_member + label: 查询分级管理员成员列表 + label_en: mgmt api list grade manager member + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/management/grade_managers/{grade_manager_id}/members/ + name: mgmt_api_add_grade_manager_member + label: 添加分级管理员成员 + label_en: mgmt api add grade manager member + suggest_method: POST + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/ + dest_http_method: POST + is_hidden: true + +- path: /v2/iam/management/grade_managers/{grade_manager_id}/members/ + name: mgmt_api_delete_grade_manager_member + label: 删除分级管理员成员 + label_en: mgmt api delete grade manager member + suggest_method: DELETE + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/ + dest_http_method: DELETE + is_hidden: true + +- path: /v2/iam/management/grade_managers/{grade_manager_id}/groups/ + name: mgmt_api_list_grade_manager_groups + label: 查询用户组列表 + label_en: mgmt api list grade manager groups + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/groups/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/management/grade_managers/{grade_manager_id}/groups/ + name: mgmt_api_create_group + label: 创建用户组 + label_en: mgmt api create group + suggest_method: POST + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/groups/ + dest_http_method: POST + is_hidden: true + +- path: /v2/iam/management/groups/{group_id}/ + name: mgmt_api_update_group_base_info + label: 更新用户组名称和描述 + label_en: mgmt api update group base info + suggest_method: PUT + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/ + dest_http_method: PUT + is_hidden: true + +- path: /v2/iam/management/groups/{group_id}/ + name: mgmt_api_delete_group + label: 删除用户组 + label_en: mgmt api delete group + suggest_method: DELETE + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/ + dest_http_method: DELETE + is_hidden: true + +- path: /v2/iam/management/groups/{group_id}/members/ + name: mgmt_api_list_group_member + label: 查询用户组成员列表 + label_en: mgmt api list group member + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/management/groups/{group_id}/members/ + name: mgmt_api_add_group_member + label: 添加用户组成员 + label_en: mgmt api add group member + suggest_method: POST + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/ + dest_http_method: POST + is_hidden: true + +- path: /v2/iam/management/groups/{group_id}/members/ + name: mgmt_api_delete_group_member + label: 删除用户组成员 + label_en: mgmt api delete group member + suggest_method: DELETE + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/ + dest_http_method: DELETE + is_hidden: true + +- path: /v2/iam/management/groups/{group_id}/policies/ + name: mgmt_api_grant_group_policy + label: 用户组授权 + label_en: mgmt api grant group policy + suggest_method: POST + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/policies/ + dest_http_method: POST + is_hidden: true + +- path: /v2/iam/management/users/grade_managers/ + name: mgmt_api_list_user_grade_manager + label: 查询用户的分级管理员列表 + label_en: mgmt api list user grade manager + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/users/grade_managers/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/management/users/grade_managers/{grade_manager_id}/groups/ + name: mgmt_api_list_user_join_group + label: 查询用户在某个分级管理员下的加入的用户组列表 + label_en: mgmt api list user join group + suggest_method: GET + api_type: query + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/users/grade_managers/{grade_manager_id}/groups/ + dest_http_method: GET + is_hidden: true + +- path: /v2/iam/management/groups/applications/ + name: mgmt_api_create_group_application + label: 创建用户组申请单据 + label_en: mgmt api create group application + suggest_method: POST + api_type: operate + comp_codename: generic.v2.iam.iam_component + dest_path: /o/bk_iam/api/v1/open/management/groups/applications/ + dest_http_method: POST + is_hidden: true From 8c29c5eb31fdc79e6616092d1271cbc62094e118 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Sat, 9 Oct 2021 09:50:28 +0800 Subject: [PATCH 4/6] fix iam yaml --- .../components/confapis/iam/admin_api.yaml | 6 ++-- .../esb/components/confapis/iam/mgmt_api.yaml | 30 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/paas2/esb/components/confapis/iam/admin_api.yaml b/paas2/esb/components/confapis/iam/admin_api.yaml index dbad84e5e..43b70618d 100644 --- a/paas2/esb/components/confapis/iam/admin_api.yaml +++ b/paas2/esb/components/confapis/iam/admin_api.yaml @@ -4,7 +4,7 @@ name: admin_api_list_group label: 查询(全局)用户组列表 label_en: admin api list group - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/admin/groups/ @@ -15,7 +15,7 @@ name: admin_api_list_group_member label: 查询用户组的成员列表 label_en: admin api list group member - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/admin/groups/{group_id}/members/ @@ -26,7 +26,7 @@ name: admin_api_list_group_of_subject_join label: 查询Subject加入的用户组列表 label_en: admin api list group of subject join - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/admin/subjects/{subject_type}/{subject_id}/groups/ diff --git a/paas2/esb/components/confapis/iam/mgmt_api.yaml b/paas2/esb/components/confapis/iam/mgmt_api.yaml index 177db5fb8..3770afe2d 100644 --- a/paas2/esb/components/confapis/iam/mgmt_api.yaml +++ b/paas2/esb/components/confapis/iam/mgmt_api.yaml @@ -4,7 +4,7 @@ name: mgmt_api_create_grade_manager label: 创建分级管理员 label_en: mgmt api create grade manager - suggest_method: POST + method: POST api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/grade_managers/ @@ -15,7 +15,7 @@ name: mgmt_api_list_grade_manager_member label: 查询分级管理员成员列表 label_en: mgmt api list grade manager member - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/ @@ -26,7 +26,7 @@ name: mgmt_api_add_grade_manager_member label: 添加分级管理员成员 label_en: mgmt api add grade manager member - suggest_method: POST + method: POST api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/ @@ -37,7 +37,7 @@ name: mgmt_api_delete_grade_manager_member label: 删除分级管理员成员 label_en: mgmt api delete grade manager member - suggest_method: DELETE + method: DELETE api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/ @@ -48,7 +48,7 @@ name: mgmt_api_list_grade_manager_groups label: 查询用户组列表 label_en: mgmt api list grade manager groups - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/groups/ @@ -59,7 +59,7 @@ name: mgmt_api_create_group label: 创建用户组 label_en: mgmt api create group - suggest_method: POST + method: POST api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/groups/ @@ -70,7 +70,7 @@ name: mgmt_api_update_group_base_info label: 更新用户组名称和描述 label_en: mgmt api update group base info - suggest_method: PUT + method: PUT api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/ @@ -81,7 +81,7 @@ name: mgmt_api_delete_group label: 删除用户组 label_en: mgmt api delete group - suggest_method: DELETE + method: DELETE api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/ @@ -92,7 +92,7 @@ name: mgmt_api_list_group_member label: 查询用户组成员列表 label_en: mgmt api list group member - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/ @@ -103,7 +103,7 @@ name: mgmt_api_add_group_member label: 添加用户组成员 label_en: mgmt api add group member - suggest_method: POST + method: POST api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/ @@ -114,7 +114,7 @@ name: mgmt_api_delete_group_member label: 删除用户组成员 label_en: mgmt api delete group member - suggest_method: DELETE + method: DELETE api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/ @@ -125,7 +125,7 @@ name: mgmt_api_grant_group_policy label: 用户组授权 label_en: mgmt api grant group policy - suggest_method: POST + method: POST api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/policies/ @@ -136,7 +136,7 @@ name: mgmt_api_list_user_grade_manager label: 查询用户的分级管理员列表 label_en: mgmt api list user grade manager - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/users/grade_managers/ @@ -147,7 +147,7 @@ name: mgmt_api_list_user_join_group label: 查询用户在某个分级管理员下的加入的用户组列表 label_en: mgmt api list user join group - suggest_method: GET + method: GET api_type: query comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/users/grade_managers/{grade_manager_id}/groups/ @@ -158,7 +158,7 @@ name: mgmt_api_create_group_application label: 创建用户组申请单据 label_en: mgmt api create group application - suggest_method: POST + method: POST api_type: operate comp_codename: generic.v2.iam.iam_component dest_path: /o/bk_iam/api/v1/open/management/groups/applications/ From 25a8bfe237333f51ef8a6bdcedd33447b942d9ed Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Sat, 9 Oct 2021 09:59:07 +0800 Subject: [PATCH 5/6] fix nodeman --- paas2/esb/components/confapis/nodeman/nodeman.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/paas2/esb/components/confapis/nodeman/nodeman.yaml b/paas2/esb/components/confapis/nodeman/nodeman.yaml index 0d0380ba0..054a659af 100644 --- a/paas2/esb/components/confapis/nodeman/nodeman.yaml +++ b/paas2/esb/components/confapis/nodeman/nodeman.yaml @@ -858,17 +858,6 @@ suggest_method: GET is_hidden: true -- api_type: operate - comp_codename: generic.v2.nodeman.nodeman_component - name: subscription_update - label: 更新订阅 - label_en: null - dest_path: /backend/api/subscription/update/ - path: /v2/nodeman/backend/api/subscription/update/ - dest_http_method: POST - suggest_method: POST - is_hidden: true - - api_type: query comp_codename: generic.v2.nodeman.nodeman_component name: subscription_update From 0e14dcbc53c51420114e7ae80e6316b71b982ecb Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Sat, 9 Oct 2021 10:26:09 +0800 Subject: [PATCH 6/6] fix monitor_v3 docs --- .../monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md | 2 +- .../monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md index cbb9e57a7..f5b9ef2d9 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/save_alarm_strategy_v2.md @@ -433,7 +433,7 @@ host_set_template 11 ], "notice_template": { - "anomaly_template": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "anomaly_template": "", "recovery_template": "" } } diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md index 10fc27306..9479a2d9d 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/search_alarm_strategy_v2.md @@ -212,7 +212,7 @@ 11 ], "notice_template": { - "anomaly_template": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "anomaly_template": "", "recovery_template": "" } }