From 95f30ffda40032640fb59bbf0b28060642b1f49d Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Fri, 27 May 2022 11:00:42 +0800 Subject: [PATCH 1/3] update monitor_v3 --- .../monitor_v3/apidocs/en/add_shield.md | 172 ++++++ .../apidocs/en/delete_alarm_strategy.md | 46 ++ .../apidocs/en/delete_alarm_strategy_v2.md | 49 ++ .../apidocs/en/delete_notice_group.md | 44 ++ .../monitor_v3/apidocs/en/disable_shield.md | 44 ++ .../monitor_v3/apidocs/en/edit_shield.md | 95 +++ .../apidocs/en/export_uptime_check_task.md | 343 +++++++++++ .../monitor_v3/apidocs/en/get_event_log.md | 121 ++++ .../monitor_v3/apidocs/en/get_shield.md | 192 ++++++ .../monitor_v3/apidocs/en/get_ts_data.md | 103 ++++ .../apidocs/en/import_uptime_check_node.md | 172 ++++++ .../apidocs/en/import_uptime_check_task.md | 402 +++++++++++++ .../monitor_v3/apidocs/en/list_shield.md | 167 ++++++ .../apidocs/en/list_storage_list.md | 53 ++ ...etadata_clean_result_table_metric_split.md | 52 ++ .../en/metadata_create_cluster_info.md | 76 +++ .../apidocs/en/metadata_create_data_id.md | 83 +++ .../apidocs/en/metadata_create_event_group.md | 119 ++++ .../en/metadata_create_result_table.md | 172 ++++++ ...tadata_create_result_table_metric_split.md | 65 +++ .../en/metadata_create_time_series_group.md | 145 +++++ .../apidocs/en/metadata_delete_event_group.md | 51 ++ .../en/metadata_delete_time_series_group.md | 51 ++ .../apidocs/en/metadata_get_data_id.md | 103 ++++ .../apidocs/en/metadata_get_event_group.md | 103 ++++ .../apidocs/en/metadata_get_result_table.md | 99 ++++ .../en/metadata_get_result_table_storage.md | 94 +++ .../en/metadata_get_time_series_group.md | 133 +++++ .../apidocs/en/metadata_list_label.md | 98 ++++ .../apidocs/en/metadata_list_result_table.md | 105 ++++ .../en/metadata_list_transfer_cluster.md | 56 ++ .../en/metadata_modify_cluster_info.md | 105 ++++ .../apidocs/en/metadata_modify_data_id.md | 101 ++++ .../apidocs/en/metadata_modify_event_group.md | 116 ++++ .../en/metadata_modify_result_table.md | 164 ++++++ .../en/metadata_modify_time_series_group.md | 156 +++++ .../apidocs/en/metadata_query_event_group.md | 108 ++++ .../apidocs/en/metadata_query_tag_values.md | 59 ++ .../en/metadata_query_time_series_group.md | 129 +++++ .../en/metadata_upgrade_result_table.md | 48 ++ .../apidocs/en/save_alarm_strategy.md | 303 ++++++++++ .../apidocs/en/save_alarm_strategy_v2.md | 483 ++++++++++++++++ .../apidocs/en/save_notice_group.md | 103 ++++ .../apidocs/en/search_alarm_strategy.md | 270 +++++++++ .../apidocs/en/search_alarm_strategy_v2.md | 346 +++++++++++ .../monitor_v3/apidocs/en/search_event.md | 264 +++++++++ .../apidocs/en/search_notice_group.md | 97 ++++ .../apidocs/en/switch_alarm_strategy.md | 59 ++ .../apidocs/en/update_partial_strategy_v2.md | 71 +++ .../monitor_v3/apidocs/zh_hans/add_shield.md | 2 +- .../monitor_v3/apidocs/zh_hans/get_ts_data.md | 17 +- .../zh_hans/import_uptime_check_task.md | 3 +- .../metadata_create_time_series_group.md | 2 +- .../apidocs/zh_hans/save_alarm_strategy.md | 6 +- .../confapis/monitor_v3/monitor_v3.yaml | 546 +++++++++++++++--- 55 files changed, 7071 insertions(+), 95 deletions(-) create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/add_shield.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy_v2.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_notice_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/disable_shield.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/edit_shield.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/export_uptime_check_task.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/get_event_log.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/get_shield.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/get_ts_data.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_node.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_task.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/list_shield.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/list_storage_list.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_clean_result_table_metric_split.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_cluster_info.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_data_id.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_event_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table_metric_split.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_event_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_data_id.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_event_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table_storage.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_label.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_result_table.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_transfer_cluster.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_cluster_info.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_data_id.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_event_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_result_table.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_event_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_tag_values.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_time_series_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_upgrade_result_table.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy_v2.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/save_notice_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy_v2.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/search_event.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/search_notice_group.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/switch_alarm_strategy.md create mode 100644 paas2/esb/components/confapis/monitor_v3/apidocs/en/update_partial_strategy_v2.md diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/add_shield.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/add_shield.md new file mode 100644 index 000000000..c1443730a --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/add_shield.md @@ -0,0 +1,172 @@ +### Function Description + +Create shield configuration + +### Request Parameters + +{{ common_args_desc }} + +#### Nterface Parameters + +| Field | Type | Required | Description | +| ---------------- | ------ | ---- | ------------------------------------------------------------ | +| bk_biz_id | int | yes | business id | +| category | string | yes | shield type (scope: "scope", strategy: "strategy", event: "event", alert: "alert") | +| description | string | yes | description | +| begin_time | string | yes | start time | +| end_time | string | yes | end time | +| cycle_config | dict | yes | shield configuration | +| shield_notice | bool | yes | whether to send shield notifications | +| notice_config | dict | no | notification configuration | +| dimension_config | dict | yes | shield dimension | + +#### Shield Configuration (cycle_config) + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | -------------------------------------------------- | +| begin_time | string | no | start time (every day) | +| end_time | string | no | end time (daily) | +|type | int | yes | type of masking period (single: 1, daily: 2, weekly: 3, monthly: 4) | +| day_list | list | No | When the period is a month, the days to be shielded | +| week_list | list | No | Days to be shielded when the period is weeks | + +#### Notification Configuration (notice_config) + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ------------------------------------------------------------ | +| notice_time | int | yes | N minutes before shield start/end | +| notice_way | list | yes | type of notification, optional values ​​"weixin", "mail", "sms", "voice" | +| notice_receiver | list | Yes | Notifiers, including operation and maintenance personnel, product personnel, testers, developers, active and standby personnel, and backup managers | + +#### Mask Dimension (dimension_config) + +The masking dimension is related to the masking type (category) + +##### "scope" + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | --------------------------------------------- | +| scope_type | string | yes | masking scope, optional values ​​"instance", "ip", "node", "biz" | +| target | list | no | list of instances according to scope type | +| metric_id | list | no | metric id | + +##### "strategy" + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | ---------------------------- | +| id | list | Yes | policy id | +| level | list | No | alarm level | +| scope_type | string | no | mask scope, optional values ​​"ip", "node" | +| target | list | no | list of instances according to scope type | + +##### "event" + +| Field | Type | Required | Description | +| ---- | ------ | ---- | ------ | +| id | string | Yes | event id | + +##### "alert" + +| Field | Type | Required | Description | +| --------- | ---- | ---- | ------ | +| alert_ids | list | yes | alert ids | + +> Note: The target in scope and strategy is selected according to scope_type. instances corresponds to instances_id, ip corresponds to {ip,bk_cloud_id}, node corresponds to {bk_obj_id, bk_inst_id}, and biz does not need to pass in anything + +#### Sample Data + +Range-Based Shielding + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "category":"scope", + "begin_time":"2019-11-21 00:00:00", + "end_time":"2019-11-23 23:59:59", + "cycle_config":{ + "begin_time":"", + "end_time":"", + "day_list":[], + "week_list":[], + "type":1 + }, + "shield_notice":true, + "notice_config":{ + "notice_time":5, + "notice_way":["weixin"], + "notice_receiver":[ + { + "id":"user1", + "type":"user" + } + ] + }, + "description":"test", + "dimension_config":{ + "scope_type":"instance", + "target":[8] + }, + "bk_biz_id":2 +} +``` + +Policy-Based Shielding + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "category":"strategy", + "begin_time":"2019-11-21 00:00:00", + "end_time":"2019-11-23 23:59:59", + "cycle_config":{ + "begin_time":"", + "end_time":"", + "day_list":[], + "week_list":[], + "type":1 + }, + "shield_notice":true, + "notice_config":{ + "notice_time":5, + "notice_way":["weixin"], + "notice_receiver":[ + { + "id":"user1", + "type":"user" + } + ] + }, + "description":"test", + "dimension_config":{ + "id": 1, + "level":[1] + }, + "bk_biz_id":2 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | mask configuration id | + +#### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": { + "id": 1 + }, + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy.md new file mode 100644 index 000000000..e2c08621f --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy.md @@ -0,0 +1,46 @@ +### Function description + +Delete alert strategy + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| :-------- | ---- | ---- | ---------- | +| bk_biz_id | int | yes | business id | +| id | int | yes | alarm strategy ID | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 2, + "id": 1 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | null | return data | + +##### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": null, + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy_v2.md new file mode 100644 index 000000000..60b3ee80e --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_alarm_strategy_v2.md @@ -0,0 +1,49 @@ +### Function description + +Delete strategy configuration + +### Request parameters + +{{ common_args_desc }} + +#### interface parameters + +| Field | Type | Required | Description | +| :-------- | ---- | ---- | -------------- | +| bk_biz_id | int | yes | business id | +| ids | list | yes | list of alarm strategy IDs | + + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 7, + "ids": [49] +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------------ | +| result | bool | whether the request was successful | +| code | int | returned status code | +| message | string | description | +| data | list | list of deleted strategy ids | + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": [ + 49 + ] +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_notice_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_notice_group.md new file mode 100644 index 000000000..7d00a6376 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/delete_notice_group.md @@ -0,0 +1,44 @@ +### Function description + +delete notification group + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ---- | ---- | ---- | -------- | +| ids | list | yes | notification group id | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "ids": [1] +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | null | return data | + +#### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": null, + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/disable_shield.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/disable_shield.md new file mode 100644 index 000000000..350fb9c43 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/disable_shield.md @@ -0,0 +1,44 @@ +### Function description + +remove shielding configuration + +### request parameters + +{{ common_args_desc }} + +#### interface parameters + +| Field | Type | Required | Description | +| ---- | ---- | ---- | ---------- | +| id | int | yes | shield config id | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "id": 1 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | whether the request was successful | +| code | int | returned status code | +| message | string | description | +| data | string | return data | + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "", + "data": "" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/edit_shield.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/edit_shield.md new file mode 100644 index 000000000..1c9501bb2 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/edit_shield.md @@ -0,0 +1,95 @@ +### Function description + +Edit shield configuration + +### request parameters + +{{ common_args_desc }} + +#### interface parameters + +| Field | Type | Required | Description | +| ------------- | ------ | ---- | --------------------------------------------------------- | +| bk_biz_id | int | yes | business id | +| description | string | yes | description | +| begin_time | string | yes | start time | +| end_time | string | yes | end time | +| cycle_config | dict | yes | shield configuration | +| shield_notice | bool | yes | whether to send shield notifications | +| notice_config | dict | no | notification configuration | +| id | int | yes | mask config id | +| level | int | No | The level of the masking strategy (if the masking type is strategy masking, the level needs to be passed in) | + +#### Shield configuration (cycle_config) + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | -------------------------------------------------- | +| begin_time | string | no | start time (every day) | +| end_time | string | no | end time (daily) | +|type | int | yes | type of masking period (single: 1, daily: 2, weekly: 3, monthly: 4) | +| day_list | list | No | When the period is a month, the days to be masked | +| week_list | list | No | The week is the day that needs to be masked | + +#### Notification configuration (notice_config) + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ------------------------------------------------------------ | +| notice_time | int | yes | N minutes before shield start/end | +| notice_way | list | yes | type of notification, optional values ​​"weixin", "mail", "sms", "voice" | +| notice_receiver | list | Yes | Notifiers, including operation and maintenance personnel, product personnel, testers, developers, active and standby personnel, and backup managers | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "category":"scope", + "begin_time":"2019-11-21 00:00:00", + "end_time":"2019-11-23 23:59:59", + "cycle_config":{ + "begin_time":"", + "end_time":"", + "day_list":[], + "week_list":[], + "type":1 + }, + "shield_notice":true, + "notice_config":{ + "notice_time":5, + "notice_way":["weixin"], + "notice_receiver":[ + { + "id":"user1", + "type":"user" + } + ] + }, + "id": 1, + "description":"test", + "bk_biz_id":2 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ---------------- | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | Modified shielding strategy id | + +#### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": { + "id": 1 + }, + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/export_uptime_check_task.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/export_uptime_check_task.md new file mode 100644 index 000000000..cf2fff074 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/export_uptime_check_task.md @@ -0,0 +1,343 @@ +### Function description + +uptime check configuration export + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ------ | ------ | ---- | ------------------------------------------------------------ | +| bk_biz_id | int | yes | business id | +| protocol | str | no | protocol type (TCP, UDP, HTTP)| +| task_ids | str | no | task IDs, multiple tasks separated by commas | +| node_conf_needed | int | No | Whether to export the node configuration information related to the task, 0 or 1, the default is 1 | + +#### Request parameter example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 2, + "task_ids": "60", + "protocol": "TCP" +} +``` + +### Return parameters + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| result | bool | Returns the result, true for success, false for failure | +| code | int | Return code, 200 indicates success, other values ​​indicate failure | +| message | string | Error message | +| data | list | results | + +## data + +There are multiple configuration lists (conf_list) + +### Configuration list --conf_list + +| Field | Type | Description | +| -------------- | ---- | -------------- | +| collector_conf | dict | Basic configuration of uptime check | +| target_conf | dict | configuration for dispatching test tasks | +| monitor_conf | list | The monitoring strategy corresponding to the dial test task | + +#### Basic configuration of uptimecheck --data.conf_list.collector_conf + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| location | dict | The address of the dial test target | +| groups | str | The group to which the test task belongs | +| name | str | Call test task name | +| protocol | str | dial test task protocol type | +| config | dict | Detailed configuration of uptime check | + +##### Basic configuration of uptimecheck detailed configuration (TCP)--data.conf_list.collector_conf.config (TCP, UDP) + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| ip_list | list | target IP address | +| port | int | port address | +| period | int | Collection period, unit min | +| response_format | str | response information matching method (inclusive: in, not inclusive: nin, regular: reg) | timeout | int | expected response time | +| response | str | Expected response content | +| response_code | str | Expected response code | + +###### Example of config returned by http task + +```json +{ +"config": { +"insecure_skip_verify": true, +"urls": "http://baidu.com", +"response_code": "", +"request": null, +"period": 1, +"response_format": "in", +"method": "GET", +"headers": [], +"timeout": 3000, +"response": null +} +} +``` +##### Basic configuration of uptimecheck detailed configuration (HTTP)--data.conf_list.collector_conf.config (HTTP) + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| urls | str | url | +| method | str | Request method | +| headers | list | request headers | +| insecure_skip_verify | bool | Whether to enable ssh verification | +| period | int | Collection period, unit min | +| response_format | str | response information matching method (inclusive: in, not inclusive: nin, regular: reg) | timeout | int | expected response time | +| response | str | Expected response content | +| response_code | str | Expected response code | + +##### Dial target address --data.conf_list.collector_conf.location + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| bk_state_name | str | country | +| bk_province_name | str | province | + +#### Uptimecheck delivery configuration --data.conf_list.target_conf + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| bk_biz_id | int | Business ID | +| node_list | list | node information associated with the task | + +##### Task-related node information --data.conf_list.target_conf.node_list + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| node_conf | dict | Node configuration information | +| target_conf | dict | Node delivery information | + +###### Node delivery information --data.conf_list.target_conf.node_list.target_conf + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| bk_biz_id | int | The business of the node | +| ip | str | Node IP | +| bk_cloud_id | int | Node cloud region ID | + +###### Node configuration information --data.conf_list.target_conf.node_list.node_conf + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| carrieroperator | str | carrier information | +| name | str | node name | +| is_common | bool | Is it a common node | +| location | dict | The region where the node is located | + +###### The region where the node is located --data.conf_list.target_conf.node_list.node_conf.location + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| country | str | country | +| city | str | province | + +#### The region where the node is located --data.conf_list.monitor_conf + +| Field | Type | Description | +| ----------- | ------ | ------------ | +| alarm_level_config | dict | Monitoring trigger condition configuration | +| monitor_target | str | monitor target field| +| unit | str | unit | +| display_name | str | monitor name | +| node_count | int | number of nodes | +| is_enabled | bool | whether to enable | +| nodata_alarm | int | no data alarm | +| rules | dict | Alarm convergence configuration | +| is_classify_notice | bool | Whether to classify alarms | +| where_sql | str | Monitoring source query conditions | +| condition | list | Monitoring scope | +| bk_biz_id | int | Business ID | +| scenario | str | monitoring scenario | +| monitor_id | int | monitor source ID | +| alarm_strategy_id | int | monitoring strategy ID | +| is_recovery | bool | auto recovery | + +##### Alarm convergence configuration --data.conf_list.monitor_conf.rules + +| Field | Type | Description | +| ------|-------|-------| +| alarm_window | int | alarm window | +| check_window | int | check window | +| count | int | number | + +##### Monitoring trigger condition configuration --data.conf_list.monitor_conf.alarm_level_config + +Field | Type | Description | +------|-------|-------| +1 | dict | The alarm trigger configuration corresponding to the alarm level, expressed as a fatal alarm | +2 | dict | The alarm trigger configuration corresponding to the alarm level, which is displayed as an early warning alarm | +3 | dict | The alarm trigger configuration corresponding to the alarm level, which is displayed as a reminder alarm | + +###### Alarm trigger configuration corresponding to alarm level --data.conf_list.monitor_conf.alarm_level_config.1 + +Field | Type | Description | +------|-------|-------| +alarm_start_time | str | Start alarm time of the day | +alarm_end_time | str | end of day alarm time | +detect_algorithm | list | Detection algorithm configuration | +is_recovery | str | auto recovery | +monitor_level | int | Alarm level, 1 fatal, 2 early warning, 3 reminder | +notify_way | list |Notification methods, mail, wechat, sms, phone | +phone_receiver | list | Phone notification object, account name | +responsible | list | List of other notifiers | +role_list | list | Notifier group, configured in business management | + +###### Detection algorithm configuration --data.conf_list.monitor_conf.alarm_level_config.1.detect_algorithm + +|Field|Type|Description| +|------|-------|-------| +| config | dict | Detailed configuration of detection algorithm | +| algorithm_id | int | Detection algorithm ID, static threshold 1000, year-on-year strategy (simple) 1001, chain strategy (simple) 1002 | + +###### Detection algorithm detailed configuration (static threshold) --data.conf_list.monitor_conf.alarm_level_config.1.detect_algorithm.config + +|Field|Type|Description| +|------|-------|-------| +threshold | int | comparison value | +method | str | comparison method | +message | str | description | + +###### Detection algorithm detailed configuration (year-on-year, chain ratio)--data.conf_list.monitor_conf.alarm_level_config.1.detect_algorithm.config + +|Field|Type|Description| +|------|-------|-------| +ceil | int | greater than the set value alarm | +floor | str | Lower than set value alarm | +message | str | description | + +#### Return parameter example + +```json +{ + "message": "OK", + "code": 200, + "data": [ + { + "target_conf": { + "bk_biz_id": 0, + "node_id_list": [], + "node_list": [ + { + "node_conf": { + "carrieroperator": "内网", + "location": { + "country": "China", + "city": "Guangdong" + }, + "name": "China Guangdong Intranet", + "is_common": false + }, + "target_conf": { + "bk_biz_id": 0, + "ip": "", + "bk_cloud_id": 0 + } + }, + { + "node_conf": { + "carrieroperator": "内网", + "location": { + "country": "China", + "city": "Guangdong" + }, + "name": "China Guangdong Intranet", + "is_common": false + }, + "target_conf": { + "bk_biz_id": 0, + "ip": "", + "bk_cloud_id": 0 + } + } + ] + }, + "collector_conf": { + "config": { + "ip_list": [ + "10.0.0.1" + ], + "period": 1, + "response_format": "in", + "port": 3306, + "timeout": 2900, + "response": null + }, + "protocol": "TCP", + "name": "test_tcp1", + "groups": "Uncategorized", + "location": { + "bk_state_name": "China", + "bk_province_name": "Beijing" + } + }, + "monitor_conf": [ + { + "alarm_level_config": { + "2": { + "notify_way": [ + "mail" + ], + "role_list": [ + "Tester" + ], + "monitor_level": 2, + "alarm_end_time": "23:59", + "responsible": [], + "detect_algorithm": [ + { + "config": { + "threshold": 10, + "message": "", + "method": "gte" + }, + "algorithm_id": 1000 + } + ], + "phone_receiver": [], + "alarm_start_time": "00:00", + "is_recovery": false + } + }, + "monitor_target": "available", + "unit": "%", + "display_name": "\"test_tcp1\"Node Average Availability", + "node_count": 0, + "is_enabled": true, + "nodata_alarm": 0, + "rules": { + "count": 1, + "alarm_window": 1440, + "check_window": 5 + }, + "is_classify_notice": false, + "where_sql": "", + "condition": [ + [] + ], + "bk_biz_id": 2, + "scenario": "uptimecheck", + "monitor_id": 0, + "alarm_strategy_id": 0, + "is_recovery": false + } + ] + } + ], + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_event_log.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_event_log.md new file mode 100644 index 000000000..9b44d72f5 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_event_log.md @@ -0,0 +1,121 @@ +### Function description + +Query event flow records + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ---- | ------ | ---- | ------ | +| id | string | yes | alert ID | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "id": 164239028644167 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| ----------- | ------ | -------- | +| status | string | status | +| event_id | string | event ID | +| message | string | log message | +| operate | string | record type | +| extend_info | dict | additional data | +| create_time | string | creation time | + +#### operate - record type + +* CREATE - alarm generated +* CONVERGE - alarm convergence +* RECOVER - alarm recovery +* CLOSE - the alarm is closed +* DELAY_RECOVER - delay recovery +* ABORT_RECOVER - Abort recovery +* SYSTEM_RECOVER - alarm recovery +* SYSTEM_CLOSE - alarm close +* ACK - alarm acknowledgement +* SEVERITY_UP - alert level adjustment +* ACTION - handle the action + +#### status - status + +* SUCCESS - success + +#### extend_info + +Different types of records have different data + +##### ANOMALY_NOTICE - alert notification + +* action - notification configuration (refer to the action_list description in the "query event" interface documentation) + +```json +{ + "action": {} +} +``` + +##### CONVERGE - Alarm convergence + +* process_time - the processing time period for the converged data points +* anomaly_count - the number of convergence anomaly points +* data_time - the data time period for the converged data point +* anomaly_record - anomaly point record (refer to the origin_alarm description in the "query event" interface documentation) + +```json +{ + "process_time": { + "max": 1583914154, + "min": 1583911227 + }, + "anomaly_record": {}, + "data_time": { + "max": 1583914020, + "min": 1583911080 + }, + "anomaly_count": 50 +} +``` + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "ok", + "data": [ + { + "status": "SUCCESS", + "event_id": "164239028644167", + "message": "", + "operate": "CREATE", + "extend_info": "", + "create_time": "2020-01-01 00:00:00" + } + ] +} +``` + +| +| diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_shield.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_shield.md new file mode 100644 index 000000000..339e1e028 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_shield.md @@ -0,0 +1,192 @@ +### Function description + +Query shield details + +### Request parameters + +{{ common_args_desc }} + +#### interface parameters + +| Field | Type | Required | Description | +| --------- | ---- | ---- | ------ | +| id | int | yes | shield id | +| bk_biz_id | int | yes | business id | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "id": 1, + "bk_biz_id": 2 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### data field description + +| Field | Type | Description | +| ---------------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID | +| category | string | mask type (scope: "scope", strategy: "strategy", event: "event", alert: "alert") | +| description | string | description | +| begin_time | string | start time | +| end_time | string | end time | +| cycle_config | dict | shield configuration | +| shield_notice | bool | whether to send shield notification | +| notice_config | dict | notification configuration | +| dimension_config | dict | mask dimension | +| id | int | mask ID | +| scope_type | string | scope type | +| status | int | current status, shielding (1), expired (2), released (3) | + +#### Shield configuration (cycle_config) + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | -------------------------------------------------- | +| begin_time | string | no | start time (every day) | +| end_time | string | no | end time (daily) | +|type | int | yes | type of masking period (single: 1, daily: 2, weekly: 3, monthly: 4) | +| day_list | list | No | When the period is a month, the days to be masked | +| week_list | list | No | The week is the day that needs to be masked | + +#### Notification configuration (notice_config) + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ------------------------------------------------------------ | +| notice_time | int | yes | N minutes before shield start/end | +| notice_way | list | yes | type of notification, optional values ​​"weixin", "mail", "sms", "voice" | +| notice_receiver | list | Yes | Notifiers, including operation and maintenance personnel, product personnel, testers, developers, active and standby personnel, and backup managers | + +#### mask dimension (dimension_config) + +The masking dimension is related to the masking type (category) + +##### "scope" + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | --------------------------------------------- | +| scope_type | string | yes | masking scope, optional values ​​"instance", "ip", "node", "biz" | +| target | list | no | list of instances according to scope type | +| metric_id | list | no | metric id | + +##### "strategy" + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | ---------------------------- | +| id | list | is | policy id | +| level | list | No | Alarm level | +| scope_type | string | no | mask scope, optional values ​​"ip", "node" | +| target | list | no | list of instances according to scope type | + +##### "event" + +| Field | Type | Required | Description | +| ---- | ------ | ---- | ------ | +| id | string | is | event id | + +##### "alert" + +| Field | Type | Required | Description | +| --------- | ---- | ---- | ------ | +| alert_ids | list | yes | alert ids | + +> Note: The target in scope and strategy is selected according to scope_type. instances corresponds to instances_id, ip corresponds to {ip,bk_cloud_id}, node corresponds to {bk_obj_id, bk_inst_id}, and biz does not need to pass in anything + +#### Sample data + +Range-Based Masking + +```json +{ + "code": 200, + "message": "ok", + "result": true, + "data": { + "id": 1, + "scope_type": "instance", + "status": 1, + "category":"scope", + "begin_time":"2019-11-21 00:00:00", + "end_time":"2019-11-23 23:59:59", + "cycle_config":{ + "begin_time":"", + "end_time":"", + "day_list":[], + "week_list":[], + "type":1 + }, + "shield_notice":true, + "notice_config":{ + "notice_time":5, + "notice_way":["weixin"], + "notice_receiver":[ + { + "id":"user1", + "type":"user" + } + ] + }, + "description":"test", + "dimension_config":{ + "scope_type":"instance", + "target":[8] + }, + "bk_biz_id":2 + } +} + +``` + +Policy-Based Shielding + +```json +{ + "result": true, + "code": 200, + "messgae" : "ok", + "data": { + "id": 1, + "scope_type": "instance", + "status": 1, + "category":"scope", + "begin_time":"2019-11-21 00:00:00", + "end_time":"2019-11-23 23:59:59", + "cycle_config":{ + "begin_time":"", + "end_time":"", + "day_list":[], + "week_list":[], + "type":1 + }, + "shield_notice":true, + "notice_config":{ + "notice_time":5, + "notice_way":["weixin"], + "notice_receiver":[ + { + "id":"user1", + "type":"user" + } + ] + }, + "description":"test", + "dimension_config":{ + "scope_type":"instance", + "target":[8] + }, + "bk_biz_id":2 + } +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_ts_data.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_ts_data.md new file mode 100644 index 000000000..1decffe2f --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/get_ts_data.md @@ -0,0 +1,103 @@ + + +### Function description + +Chart data query +Query the specified storage engine based on the given sql expression + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| sql | string | yes | SQL query statement | +| prefer_storage | string | no | query engine (default influxdb) | +| bk_username | string | No | App_code of the whitelist is required | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_username":"admin", + "sql":"select max(in_use) as _in_use from 3_system_disk where time >= \"1m\" group by ip, bk_cloud_id, bk_supplier_id, device_name, minute1 order by time desc limit 1" +} +``` + +> the resulting table in sql is named biz_id + db_name + table_name +> +> - Biz_id: business id +> - Db_name: database name +> - Table_name: data table name +> +> Example: 2_system_cpu_detail: cpu_detail table of system library under business 2, The sql statement to query the usage of single-core cpu within an hour: +> +> Select Mean(usage) as usage from 2_system_detail where time > '1h' group by ip,device_name,minute1 limit 10 + +> The result table 3_system_disk in the above request example indicates: the disk table in the system library under business 3 + +>Note: The above libraries and tables do not correspond to the actual physical libraries and tables in the time series storage. Instead, it refers to the library table of the 'Source Data Management Module' + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | Successfully updated policy id table | +| request_id | string | request id | + +#### Data field description + +| Field | Type | Description | +| ------------ | ------ | -------- | +| list | list | Query results | +| totalRecords | int | total records | +| timetaken | float | query time | +| device | string | query engine | + +#### data.list + +The content here is the relevant content of sql search + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{ + "list":[ + { + "ip":"x.x.x.x", + "time":1543487700000, + "bk_supplier_id":"0", + "device_name":"C:", + "_in_use":27.0269684761, + "bk_cloud_id":"0", + "minute1":1543487700000 + }, + { + "ip":"x.x.x.x", + "time":1543487700000, + "bk_supplier_id":"0", + "device_name":"\/", + "_in_use":8.3368418991, + "bk_cloud_id":"0", + "minute1":1543487700000 + } + ], + "timetaken":0.0059459209, + "totalRecords": 2, + "device":"influxdb" + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_node.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_node.md new file mode 100644 index 000000000..19d38925c --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_node.md @@ -0,0 +1,172 @@ +### Function description + +Import the uptime check node + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| --------- | ---- | ---- | -------- | +| conf_list | list | yes | node list | + +#### task list --conf_list + +| Field | Type | Required | Description | +| ----------- | ---- | ---- | ------------ | +| target_conf | dict | yes | node delivery configuration | +| node_conf | dict | yes | node basic configuration | + +##### Node delivery configuration --target_conf + +| Field | Type | Required | Description | +| ----------- | ---- | ---- | -------- | +| ip | str | yes | IP | +| bk_cloud_id | int | yes | cloud zone id | +| bk_biz_id | int | yes | business id | + +##### Node basic configuration --node_conf + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ------------------------------------------ | +| is_common | bool | No | Is it a common node, default false | +| name | str | Yes | node name | +| location | dict | yes | node location | +| carrieroperator | str | yes | operator, maximum length 50 (intranet, China Unicom, mobile, other) | + +###### Node location --node_conf.location + +| Field | Type | Required | Description | +| ------- | ---- | ---- | ---- | +| country | str | Yes | country | +| city | str | Yes | city | + +#### Request parameter example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "conf_list":[{ + "node_conf": { + "carrieroperator": "内网", + "location": { + "country": "China", + "city": "Guangdong" + }, + "name": "China Guangdong Intranet", + "is_common": false + }, + "target_conf": { + "bk_biz_id": 2, + "bk_cloud_id": 0, + "ip": "x.x.x.x" + } + },{ + "node_conf": { + "carrieroperator": "内网", + "location": { + "country": "China", + "city": "Guangdong" + }, + "name": "China Guangdong Intranet", + "is_common": false + }, + "target_conf": { + "bk_biz_id": 2, + "bk_cloud_id": 0, + "ip": "x.x.x.x" + } + }]} +``` + +### Return result + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| result | bool | Returns the result, true for success, false for failure | +| code | int | Return code, 200 indicates success, other values ​​indicate failure | +| message | string | Error message | +| data | list | results | + +#### Data field description + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +failed | dict | Import failure related information | +success | dict | Import success related information | + +##### Import failure related information --data.failed + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +total | int | Number of import failures | +detail | list | Import failure details | + +###### Import failed details --data.failed.detail + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| target_conf | dict | Node delivery configuration | +| error_mes | str | Import failure reason | + +##### Import success related information --data.success + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| total | int | Number of successful imports | +| detail | list | Import success details | + +###### Import success related information --data.success.datail + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| target_conf | dict | node delivery configuration | +| node_id | int | node id imported successfully | + +#### return result example + +```json +{ + "message": "OK", + "code": 200, + "data": { + "failed": { + "total": 1, + "detail": [ + "target_conf": { + "bk_biz_id": 2, + "ip": "x.x.x.x", + "bk_cloud_id": 0 + }, + "error_mes": "The host does not exist under the business" + ] + }, + "success": { + "total": 2, + "detail": [ + { + "target_conf": { + "bk_biz_id": 2, + "ip": "x.x.x.x", + "bk_cloud_id": 0 + }, + "node_id": 30 + }, + { + "target_conf": { + "bk_biz_id": 2, + "ip": "x.x.x.x", + "bk_cloud_id": 0 + }, + "node_id": 31 + } + ] + } +}, +"result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_task.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_task.md new file mode 100644 index 000000000..89f328336 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/import_uptime_check_task.md @@ -0,0 +1,402 @@ +### Function description + +Import uptime check tasks + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| --------- | ---- | ---- | ---------------- | +| bk_biz_id | int | yes | business id | +| conf_list | list | yes | uptime check task configuration list | + +#### uptime check task configuration list --conf_list + +| Field | Type | Required | Description | +| -------------- | ---- | ---- | ---------------- | +| target_conf | dict | yes | configuration of uptime check task delivery | +| collector_conf | dict | yes | basic configuration of uptime check tasks | +| monitor_conf | list | yes | monitoring policy configuration | + +##### uptime check task delivery configuration --conf_list.target_conf + +| Field | Type | Required | Description | +| ------------ | ---- | ---- | ---------------------------------------------------------- | +| bk_biz_id | int | yes | business id | +| node_list | list | No | Default [], need to import node configuration | +| node_id_list | list | No | Default [], send node ID list, node_list and node_id_list cannot be empty at the same time | + +###### Need to import node configuration --conf_list.target_conf.node_list + +| Field | Type | Required | Description | +| ----------- | ---- | ---- | ------------ | +| target_conf | dict | yes | node delivery configuration | +| node_conf | dict | yes | node basic configuration | + +###### Node delivery configuration --conf_list.target_conf.node_list.target_conf + +| Field | Type | Required | Description | +| ----------- | ---- | ---- | -------- | +| ip | str | yes | IP | +| bk_cloud_id | int | yes | cloud zone id | +| bk_biz_id | int | yes | business id | + +###### Node basic configuration --conf_list.target_conf.node_list.node_conf + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ------------------------------------------ | +| is_common | bool | No | Is it a common node, default false | +| name | str | Yes | node name | +| location | dict | yes | node location | +| carrieroperator | str | yes | operator, maximum length 50 (intranet, China Unicom, mobile, other) | + +###### Node location --conf_list.target_conf.node_list.node_conf.location + +| Field | Type | Required | Description | +| ------- | ---- | ---- | ---- | +| country | str | Yes | country | +| city | str | Yes | city | + +##### Basic configuration of uptime check task --conf_list.collector_conf + +| Field | Type | Required | Description | +| -------- | ---- | ---- | ---------------- | +| location | dict | yes | address of the dial target | +| groups | str | Yes | The group to which the test task belongs | +| name | str | yes | uptime check task name | +| protocol | str | yes | uptime check task protocol type | +| config | dict | yes | detailed configuration of uptime check tasks | + +###### TCP task config example + +```json +"config": { + "ip_list": ["10.0.0.1"], + "port": 3306, + "period": 1, + "response_format": "in", + "timeout": 2900, + "response": null +} +``` + +###### uptime check task detailed configuration (TCP, UDP) --conf_list.collector_conf.config + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ---------------------------------------------------------- | +| ip_list | list | yes | destination IP address | +| port | int | yes | port address | +| period | int | No | Collection period, unit min, default 1 | +| response_format | str | No | Response information matching method (include: in, exclude: nin, regular: reg), default in | +| timeout | int | No | Expected response time, in ms, default 3000 | +| response | str | no | expected response content | +| response_code | str | no | expected response code | + +###### HTTP task config example + +```json +"config": { + "insecure_skip_verify": true, + "urls": "http://baidu.com", + "response_code": "", + "request": null, + "period": 1, + "response_format": "in", + "method": "GET", + "headers": [], + "timeout": 3000, + "response": null +} +``` + +###### uptime check task detailed configuration (HTTP)--conf_list.collector_conf.config + +| Field | Type | Required | +| -------------------- | ---- | ---- | +| urls | str | yes | +| method | str | yes | +| headers | list | no | +| insecure_skip_verify | bool | no | +| period | int | no | +| response_format | str | no | +| timeout | int | no | +| response | str | no | +| response_code | str | no | +| request | str | no | + +##### Monitoring policy configuration --conf_list.monitor_conf + +| Field | Type | Required | Description | +| ------------------ | ------ | ---- | ----------------------------------------------------- | +| alarm_level_config | dict | yes | monitoring trigger condition configuration | +| alarm_strategy_id | int | yes | monitoring strategy id, 0 | +| bk_biz_id | int | yes | business id | +| condition | list | yes | monitoring scope | +| display_name | string | yes | monitor name | +| is_classify_notice | bool | yes | whether to classify alarms | +| is_enabled | bool | yes | whether to enable | +| is_recovery | bool | yes | recovery alarm switch | +| monitor_target | str | yes | monitor target field | +| nodata_alarm | int | yes | number of no data alarms | +| node_count | int | yes | node average/partial node count | +| rules | dict | yes | convergence rules | +| scenario | str | yes | monitoring scenario | +| unit | str | yes | monitor field unit | +| where_sql | str | yes | can be used for precondition filtering part monitoring support using database directly as source | + +###### Convergence rules --conf_list.monitor_conf.rules + +| Field | Type | Required | Description | +| ------------ | ---- | ---- | -------- | +| alarm_window | int | yes | alarm window | +| check_window | int | yes | check_window | +| count | int | yes | number | + +###### Monitoring trigger condition configuration --conf_list.monitor_conf.alarm_level_config + +| Field | Type | Required | Description | +| ---- | ---- | ---- | ------------------------------------------ | +| 1 | dict | No | The alarm trigger configuration corresponding to the alarm level, which is a fatal alarm | +| 2 | dict | No | The alarm trigger configuration corresponding to the alarm severity, which is displayed as a warning alarm | +| 3 | dict | No | The alarm trigger configuration corresponding to the alarm severity, which is displayed as a reminder alarm | + +###### Alarm trigger configuration corresponding to alarm level --conf_list.monitor_conf.alarm_level_config.1 + +| Field | Type | Required | Description | +| ---------------- | ---- | ---- | -------------------------------------------------- | +| alarm_start_time | str | yes | start alarm time of the day | +| alarm_end_time | str | yes | end alarm time of the day | +| detect_algorithm | list | yes | detection algorithm configuration | +| is_recovery | str | yes | city | +| monitor_level | int | yes | alarm level, 1 fatal, 2 early warning, 3 reminder | +| notify_way | list | Yes | Notification method, mail, wechat, sms, phone | +| phone_receiver | list | yes | phone notification object, account name | +| responsible | list | yes | list of other notifiers | +| role_list | list | Yes | Notifier group, configured in business management | + +###### Detection algorithm configuration --conf_list.monitor_conf.alarm_level_config.1.detect_algorithm + +| Field | Type | Required | Description | +| ------------ | ---- | ---- | ------------------------------------------------------------ | +| config | dict | yes | detection algorithm detailed configuration | +| algorithm_id | int | yes | detection algorithm ID, static threshold 1000, year-on-year strategy (simple) 1001, chain strategy (simple) 1002 | + +###### Detection algorithm detailed configuration (static threshold) --conf_list.monitor_conf.alarm_level_config.1.detect_algorithm.config + +| Field | Type | Required | Description | +| --------- | ---- | ---- | -------- | +| threshold | int | yes | comparison value | +| method | str | yes | comparison method | +| message | str | No | Description | + +###### Detection algorithm detailed configuration (year-on-year, chain ratio) --conf_list.monitor_conf.alarm_level_config.1.detect_algorithm.config + +| Field | Type | Required | Description | +| ------- | ---- | ---- | -------------- | +| ceil | int | yes | greater than the set value alarm | +| floor | str | yes | lower than set value alarm | +| message | str | No | Description | + +#### Request parameter example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 2, + "conf_list": [ + { + "target_conf": { + "bk_biz_id": 0, + "node_id_list": [], + "node_list": [ + { + "node_conf": { + "carrieroperator": "内网", + "location": { + "country": "China", + "city": "Guangdong" + }, + "name": "China Guangdong Intranet", + "is_common": false + }, + "target_conf": { + "bk_biz_id": 0, + "ip": "", + "bk_cloud_id": 0 + } + }, + { + "node_conf": { + "carrieroperator": "内网", + "location": { + "country": "China", + "city": "Guangdong" + }, + "name": "China Guangdong Intranet", + "is_common": false + }, + "target_conf": { + "bk_biz_id": 0, + "ip": "", + "bk_cloud_id": 0 + } + } + ] + }, + "collector_conf": { + "config": { + "ip_list": [ + "10.0.0.1" + ], + "period": 1, + "response_format": "in", + "port": 3306, + "timeout": 2900, + "response": null + }, + "protocol": "TCP", + "name": "test_tcp1", + "groups": "Uncategorized", + "location": { + "bk_state_name": "China", + "bk_province_name": "Beijing" + } + }, + "monitor_conf": [ + { + "alarm_level_config": { + "2": { + "notify_way": [ + "mail" + ], + "role_list": [ + "Tester" + ], + "monitor_level": 2, + "alarm_end_time": "23:59", + "responsible": [], + "detect_algorithm": [ + { + "config": { + "threshold": 10, + "message": "", + "method": "gte" + }, + "algorithm_id": 1000 + }, + { + "config": { + "message": "", + "ceil": 10, + "floor": 10 + }, + "algorithm_id": 1001 + } + ], + "phone_receiver": [], + "alarm_start_time": "00:00", + "is_recovery": false + } + }, + "monitor_target": "available", + "unit": "%", + "display_name": "\"test_tcp1\"Node Average Availability", + "node_count": 0, + "is_enabled": true, + "nodata_alarm": 0, + "rules": { + "count": 1, + "alarm_window": 1440, + "check_window": 5 + }, + "is_classify_notice": false, + "where_sql": "", + "condition": [ + [] + ], + "bk_biz_id": 2, + "scenario": "uptimecheck", + "monitor_id": 0, + "alarm_strategy_id": 0, + "is_recovery": false + } + ] + } + ] +} +``` + +### return result + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| result | bool | Returns the result, true for success, false for failure | +| code | int | Return code, 200 indicates success, other values ​​indicate failure | +| message | string | Error message | +| data | list | results | + +#### data field description + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +failed | dict | Import failure related information | +success | dict | Import success related information | + +##### Import failure related information --data.failed + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +total | int | Number of import failures | +detail | list | Import failure details | + +###### Import failed details --data.failed.detail + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| error_mes | str | Import failure reason | +| task_name | str | task name | + +##### Import success related information --data.success + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| total | int | Number of successful imports | +| detail | list | Import success details | + +###### Import success related information --data.success.datail + +| Field | Type | Description | +| ------- | ------ | ----------------------------------- | +| task_name | str | task name | + +#### return result example + +```json +{ + "message": "OK", + "code": 200, + "data": { + "failed": { + "total": 0, + "detail": [{ + "task_name": "tcp_test2", + "error_month": "xx" + }] + }, + "success": { + "total": 1, + "detail": [ + { + "task_name": "test_tcp1" + } + ] + } + }, + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/list_shield.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/list_shield.md new file mode 100644 index 000000000..cc72dc816 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/list_shield.md @@ -0,0 +1,167 @@ +### Function description + +Query shield list + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ---------- | ------ |------| -------- | +| time_range | string | no | time range | +| bk_biz_id | int | no | business ID | +| is_active | bool | no | is it active | +| page | int | no | number of pages | +| page_size | int | no | number of pages per | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 1, + "is_active": true, + "time_range": "2018-01-01 -- 2019-01-01", + "page": 1, + "page_size": 10 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | data data | + +#### Data details + +| Field | Type | Description | +| ----------- | ---- | ------------ | +| count | int | total number of shielded events | +| shield_list | list | list of shield events | + +#### Shield event list: shield_list + +| Field | Type | Description | +| ---------------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID | +| category | string | mask type (scope: "scope", strategy: "strategy", event: "event", alert: "alert") | +| description | string | description | +| begin_time | string | start time | +| end_time | string | end time | +| cycle_config | dict | shield configuration | +| shield_notice | bool | whether to send shield notification | +| notice_config | dict | notification configuration | +| dimension_config | dict | mask dimension | +| id | int | mask ID | +| scope_type | string | scope type | +| status | int | current status, shielding (1), expired (2), released (3) | +| failure_time | string | failure time | +| content | string | shield content snapshot | +| is_enabled | bool | whether to enable | + +#### Shield configuration (cycle_config) + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | ------------------------------------------------------------ | +| begin_time | string | no | start time (every day) | +| end_time | string | no | end time (daily) | +| type | int | yes | type of masking period (1 if the type is single, 2 per day, 3 per week, 4 per month) | +| day_list | list | No | When the period is a month, the days to be masked | +| week_list | list | No | The week is the day that needs to be masked | + +#### Notification configuration (notice_config) + +| Field | Type | Required | Description | +| --------------- | ---- | ---- | ------------------------------------------------------------ | +| notice_time | int | yes | N minutes before shield start/end | +| notice_way | list | yes | type of notification, optional values ​​"weixin", "mail", "sms", "voice" | +| notice_receiver | list | Yes | Notifiers, including operation and maintenance personnel, product personnel, testers, developers, active and standby personnel, and backup managers | + +#### mask dimension (dimension_config) + +The masking dimension is related to the masking type (category) + +##### "scope" + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | --------------------------------------------- | +| scope_type | string | yes | masking scope, optional values ​​"instance", "ip", "node", "biz" | +| target | list | no | list of instances according to scope type | +| metric_id | list | no | metric id | + +##### "strategy" + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | ---------------------------- | +| id | list | Yes | policy id | +| level | list | No | Alarm level | +| scope_type | string | no | mask scope, optional values ​​"ip", "node" | +| target | list | no | list of instances according to scope type | + +##### "event" + +| Field | Type | Required | Description | +| ---- | ------ | ---- | ------ | +| id | string | Yes | event id | + +##### "alert" + +| Field | Type | Required | Description | +| --------- | ---- | ---- | ------ | +| alert_ids | list | yes | alert ids | + +> Note: The target in scope and strategy is selected according to scope_type. instances corresponds to instances_id, ip corresponds to {ip,bk_cloud_id}, node corresponds to {bk_obj_id, bk_inst_id}, and biz does not need to pass in anything + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "ok", + "data": [ + { + "id": 1, + "scope_type": "instance", + "status": 1, + "category":"scope", + "begin_time":"2019-11-21 00:00:00", + "end_time":"2019-11-23 23:59:59", + "failure_time": "", + "content": "", + "cycle_config":{ + "begin_time":"", + "end_time":"", + "day_list":[], + "week_list":[], + "type":1 + }, + "shield_notice":true, + "notice_config":{ + "notice_time":5, + "notice_way":["weixin"], + "notice_receiver":[ + { + "id":"user1", + "type":"user" + } + ] + }, + "description":"test", + "dimension_config":{ + "scope_type":"instance", + "target":[8] + }, + "bk_biz_id":2 + } + ] +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/list_storage_list.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/list_storage_list.md new file mode 100644 index 000000000..663fc75cc --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/list_storage_list.md @@ -0,0 +1,53 @@ +### Function description + +get storage list +Returns a list of eligible storage clusters based on the given filter parameters (not yet available) + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ---- | ---- | ---- | ---- | +| -- | -- | -- | -- | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", +} +``` + +### Return result + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | data | + +#### Data field description + +| Field | Type | Description | +| ------------ | ------ | ------------ | +| storage_name | string | storage type name | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":[{ + "storage_name": "influxdb", + }], + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_clean_result_table_metric_split.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_clean_result_table_metric_split.md new file mode 100644 index 000000000..a6d8f1dac --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_clean_result_table_metric_split.md @@ -0,0 +1,52 @@ + + +### Function description + +Clean up a result table CMDB split task + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| table_id | string | yes | result table ID | +| cmdb_level | string | yes | CMDB split level name | +| operator | string | Yes | operator | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "table_id": "system.cpu_summary", + "cmdb_level": "set", + "operator": "admin" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | results | +| request_id | string | request id | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{}, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_cluster_info.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_cluster_info.md new file mode 100644 index 000000000..e222dc42e --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_cluster_info.md @@ -0,0 +1,76 @@ + + +### Function description + +Create a storage cluster configuration +Create a storage cluster configuration based on the given configuration parameters + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| cluster_name | string | yes | storage cluster name | +| cluster_type | string | Yes | Storage cluster type, currently supports influxDB, kafka, redis, elasticsearch | +| domain_name | string | Yes | Storage cluster domain name (IP can be filled in) | +| port | int | yes | storage cluster port | +| operator | string | yes | operator | +| description | string | No | Storage cluster description information | +| auth_info | dict | no | cluster authentication information | +| version | string | no | cluster version information | +| custom_label | string | no | custom label | +| schema | string | No | Forcibly configure schema, which can be used to configure https and other situations | +| is_ssl_verify | bool | no | whether to skip SSL\TLS verification | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "cluster_name": "first_influxdb", + "cluster_type": "influxDB", + "domain_name": "influxdb.service.consul", + "operator": "admin", + "auth_info": { + "username": "username", + "password": "password" + }, + "port": 9052, + "description": "Description" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | request id | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| cluster_id | int | cluster ID | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{ + "cluster_id": 1001 + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_data_id.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_data_id.md new file mode 100644 index 000000000..4ef3823ac --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_data_id.md @@ -0,0 +1,83 @@ + + +### Function description + +Create a data source +Creates a data source based on the given configuration parameters + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| data_name | string | yes | data source name | +| etl_config | string | yes | clean template configuration, prometheus exporter corresponds to "prometheus" | +| operator | string | Yes | operator | +| mq_cluster | dict | no | message cluster used by the data source | +| data_description | string | No | The specific description of the data source | +| is_custom_source | bool | No | Whether user-defined data source, the default is Yes | +| source_label | string | yes | data source label, for example: data platform (bk_data), monitor collector (bk_monitor) | +| type_label | string | yes | data type label, for example: time series data (time_series), event data (event), log data (log) | +| custom_label | string | no | custom label configuration information | +| option | string | No | Data source configuration option content, the format is {`option_name`: `option_value`} | + +**Note**: The above `source_label` and `type_label` should be obtained through the `metadata_get_label` interface, and should not be created by yourself + +#### The options currently available for data sources include + +| option name | type | description | +| -------------- | ------ | ----------- | +| group_info_alias | string | Group ID field alias | +| encoding | string | report data encoding | +| separator | string | Separator, used to separate the character content of the reported log | +| separator_field_list | list | Field assignment after split | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "data_name": "basereport", + "etl_config": "base report", + "operator": "username", + "data_description": "basereport data source", + "type_label": "time_series", + "source_label": "bk_monitor_collector" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | request id | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk_data_id | int | result table ID | + +#### Example results + +```json +{ + "message": "OK", + "code": 200, + "data": { + "bk_data_id": 1001 + }, + "result": true, + "request_id": "408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_event_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_event_group.md new file mode 100644 index 000000000..d3b96c93d --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_event_group.md @@ -0,0 +1,119 @@ + + +### Function description + +Create an event group ID +Given a data source and business, create an attributable event group ID + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| bk_data_id | int | yes | data source id | +| bk_biz_id | int | yes | business id | +| event_group_name | string | yes | event group name | +| label | string | Yes | The event grouping label, used to represent the event monitoring object, should reuse the label under the [result_table_label] type | +| operator | string | yes | operator | +| event_info_list | list | no | event list | + +#### event_info_list specific content description + +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | -------- | +| event_name | string | yes | event name | +| dimension | list | Yes | dimension list | + +#### request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_data_id": 123, + "bk_biz_id": 123, + "event_group_name": "Event group name", + "label": "application", + "operator": "system", + "event_info_list": [{ + "event_name": "usage for update", + "dimension_list": ["dimension_name"] + },{ + "event_name": "usage for create", + "dimension_list": ["dimension_name"] + }] +} +``` + +### Return result + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| event_group_id | int | New event group ID | +| bk_data_id | int | data source ID | +| bk_biz_id | int | Business ID | +| event_group_name | string | event group name | +| label | string | label | +| is_enable | bool | whether to enable | +| creator | string | Creator | +| create_time | string | creation time | +| last_modify_user | string | Last updated person | +| last_modify_time | string | Last update time | +| event_info_list | list | event list | + +#### event_info_list description + +| Field | Type | Description | +| -------------- | ------ | -------- | +| bk_event_id | int | event id | +| event_name | string | event name | +| dimension_list | list | dimension list | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { + "event_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "event_group_name": "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", + "event_info_list": [{ + "bk_event_id": 1, + "event_name": "usage for update", + "dimension_list": [{ + "dimension_name": "field_name" + }] + },{ + "bk_event_id": 2, + "event_name": "usage for create", + "dimension_list": [{ + "dimension_name": "field_name" + }] + }] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table.md new file mode 100644 index 000000000..631358906 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table.md @@ -0,0 +1,172 @@ + + +### Function description + +Create a result table +Creates a result table based on the given configuration parameters + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| bk_data_id | int | yes | data source id | +| table_id | string | yes | result table ID, format should be library.table (eg, system.cpu) | +| table_name_zh | string | yes | Chinese name of the result table | +| is_custom_table | bool | yes | user-defined result table | +| schema_type | string | yes | result table field configuration scheme, free (no schema configuration), fixed (fixed schema) | +| operator | string | Yes | operator | +| default_storage | string | yes | default storage type, currently supports influxdb | +| default_storage_config | dict | No | The default storage information, according to each different storage, there will be different configuration content, if not provided, the default value will be used; please refer to the specific description below for the specific content | +| field_list | list | No | Field information, the array element is object, for example, the field has field_name (field name), field_type (field type), tag (field type, metricc -- indicator, dimension -- dimension), alias_name (field alias) | +| bk_biz_id | int | No | Business ID, if not provided, the default is 0 (full business) result table; if non-zero, the result table naming convention will be verified | +| label | string | Yes | The label of the result table, the secondary label is recorded here, and the corresponding primary label will be derived from the secondary label | +| external_storage | list | No | Additional storage configuration, the format is {${storage_type}: ${storage_config}}, storage_type can be kafka, influxdb, redis; storage_config is the same as default_storage_config | +| is_time_field_only | bool | No | Whether the default field requires time only, default False | +| option | list | no | additional configuration information for the result table in the format {`option_name`: `option_value`} | +| time_alias_name | string | No | Time fields need to use other field names when uploading | + +**Note**: The above `label` should be obtained through the `metadata_get_label` interface, and should not be created by yourself + +#### The options currently available for selection in the results table include +| option name | type | description | +| -------------- | ------ | ----------- | +| cmdb_level_config | list | CMDB level split configuration | +| group_info_alias | string | Group ID field alias | +| es_unique_field_list | list | ES generates a list of fields for doc_id | + +###### Parameters: default_storage_config and storage_config -- parameters supported under influxdb + +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | ---| ---| +| storage_cluster_id | int | no | use default storage cluster for this storage type | specify storage cluster | +| database | string | no | dotted first part of table_id | database stored | +| real_table_name | string | no | dotted second part of table_id | actual storage table name | +| source_duration_time | string | No | 30d | Metadata save time, it needs to conform to influxdb format | + +###### Parameters: default_storage_config and storage_config -- parameters supported under kafka +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- |--- | --- | +| storage_cluster_id | int | no | use default storage cluster for this storage type | specify storage cluster | +| topic | string | no | 0bkmonitor_storage_${table_id} | stored topic configuration | +| partition | int | No | 1 | Stores the number of partitions. Note: This is just a record. If it is a configuration with more than one topic, it needs to be expanded manually through the kafka command line tool | +| retention | int | no | 1800000 | Kafka data retention time, the default is half an hour, in ms | + +###### Parameters: default_storage_config and storage_config -- parameters supported under redis +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| storage_cluster_id | int | no | use default storage cluster for this storage type | specify storage cluster | +| key | string | no | table_id name | store key value | +| db | int | no | 0 | use db config | +| command | string | No | PUBLISH | Store command | +| is_sentinel | bool | no | False | whether sentinel mode | +| master_name | string | no | "" | master name in sentinel mode | + +**Note**: Since redis uses the queue method by default, it is discarded after consumption, so there is no time length configuration + +###### Parameters: default_storage_config and storage_config -- parameters supported under elasticsearch + +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| storage_cluster_id | int | no | - |uses the default storage cluster for this storage type +| retention | int | no | 30 | index retention time, in days, the default is 30 days | +| date_format | string | no | %Y%m%d%H | time format, the default is specific to the hour | +| slice_size | int | No | 500 | The size threshold to be sliced, the unit is GB, the default is 500GB | +| slice_gap | int | no | 120 | index slice interval, in minutes, default 2 hours | +| index_settings | string | yes | - | index creation configuration, json format | +| mapping_settings | string | no | - | index mapping configuration, **does not contain field definitions**, json format | + +**Note**: The actual index construction method is `${table_id}_${date_format}_${current_index}` + +###### Parameters: specific parameter description of field_list + +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| field_name | string | yes | - | field name | +| field_type | string | yes | - | field type, can be float, string, boolean and timestamp | +| description | string | no | "" | field description information | +| tag | string | yes | - | field tag, can be metric, dimemsion, timestamp, group | +| alias_name | string | No | None | Inbound alias | +| option | string | No | {} | Field option configuration, key is option name, value is option configuration | +| is_config_by_user | bool | yes | true | whether the user enables this field configuration | + +The options currently available include: +| option name | type | description | +| -------------- | ------ | ----------- | +| es_type | string | es configuration: map the actual field type | +| es_include_in_all | bool | es configuration: whether to include into the _all field | +| es_format | string | es configuration: time format | +| es_doc_values ​​| bool | es configuration: dimension or not | +| es_index | string | es configuration: word segmentation, the value can be true or false | +| time_format | string | The time format of the data source for Transfer to parse and report the time | +| time_zone | int | Time zone configuration, for Transfer parsing and reporting time as UTC, value range [-12, +12] | + + +#### request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_data_id": 1001, + "table_id": "system.cpu_detail", + "table_name_en": "CPU records", + "is_custom_table": true, + "schema_type": "fixed", + "operator": "username", + "default_storage": "influxdb", + "default_storage_config": { + "storage": 1, + "source_duration_time": "30d" + }, + "field_list": [{ + "field_name": "usage", + "field_type": "double", + "description": "field description", + "tag": "metric", + "alias_name": "usage_alias", + "option": [], + "is_config_by_user": true + }], + "label": "OS", + "external_storage": { + "kafka": { + "expired_time": 1800000 + } + } +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| table_id | string | result table ID | + +#### Example results + +```json +{ + "message": "OK", + "code": 200, + "data": { + "table_id": "system.cpu_detail" + }, + "result": true, + "request_id": "408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table_metric_split.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table_metric_split.md new file mode 100644 index 000000000..a180ba6a5 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_result_table_metric_split.md @@ -0,0 +1,65 @@ + + +### Function description + +Create a result table CMDB split task +According to the given data source ID, return the specific information of this result table + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| table_id | string | yes | result table ID | +| cmdb_level | string | yes | CMDB split level name | +| operator | string | Yes | operator | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "table_id": "system.cpu_summary", + "cmdb_level": "set", + "operator": "admin" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk_data_id | int | newly created data source ID | +| table_id | string | newly created result table ID | + + +#### Example results + +```json +{ + "message": "OK", + "code": 200, + "data": { + "bk_data_id": 1001, + "table_id": "system.cpu_summary_cmdb_level" + }, + "result": true, + "request_id": "408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_time_series_group.md new file mode 100644 index 000000000..3fc792025 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_create_time_series_group.md @@ -0,0 +1,145 @@ + + +### Function description + +Create a custom time series group ID +Given a data source and business, create an attributable custom time series group ID + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| bk_data_id | int | yes | data source id | +| bk_biz_id | int | yes | business id | +| time_series_group_name | string | yes | custom time series group name | +| label | string | Yes | Custom time series grouping label, used to represent monitoring objects, should reuse the label under the [result_table_label] type | +| operator | string | Yes | operator | +| metric_info_list | list | no | custom time series list | + +#### metric_info_list specific content description + +| Field | Type | Required | Description | +| ------------------- | ------ |-----| -------- | +| field_name | string | yes | custom sequence name | +| tag | list | Yes | dimension list | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_data_id": 123, + "bk_biz_id": 123, + "time_series_group_name": "Custom 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"] + }] +} +``` + +### Return result + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| time_series_group_id | int | New time series group ID | +| time_series_group_name | string | Time series group name | +| bk_data_id | int | data source id | +| bk_biz_id | int | business id | +| table_id | string | result table ID | +| label | string | event label | +| is_enable | bool | whether to enable | +| creator | string | Creator | +| create_time | string | creation time | +| last_modify_user | string | Last updated person | +| last_modify_time | string | Last update time | +| metric_info_list | list | custom time series list | + +#### data.metric_info_list specific content description + +| Field | Type | Description | +| ----------- | ------ | -------- | +| description | string | description | +| field_name | string | Field name | +| unit | string | unit | +| type | string | unit type | +| tag_list | list | tag list | + +#### data.metric_info_list.tag_list specific description + +| Field | Type | Description | +| ----------- | ------ | -------- | +| field_name | string | field name | +| description | string | description | +| unit | string | unit | +| type | string | unit type | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { + "bk_data_id": 123, + "bk_biz_id": 123, + "time_series_group_id": 1, + "time_series_group_name": "Time series custom 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/en/metadata_delete_event_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_event_group.md new file mode 100644 index 000000000..ee67f74cf --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_event_group.md @@ -0,0 +1,51 @@ + + +### Function description + +delete an event group +Given an event group ID, delete it + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| event_group_id | int | yes | event group ID | +| operator | string | Yes | operator | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "event_group_id": 123, + "operator": "admin" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_time_series_group.md new file mode 100644 index 000000000..25776b629 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_delete_time_series_group.md @@ -0,0 +1,51 @@ + + +### Function description + +Delete a custom timing group +Given a custom time series group ID, delete it + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| time_series_group_id | int | yes | custom time series group ID | +| operator | string | Yes | operator | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "time_series_group_id": 123, + "operator": "admin" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_data_id.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_data_id.md new file mode 100644 index 000000000..404157c01 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_data_id.md @@ -0,0 +1,103 @@ + + +### Function description + +Query the ID of a data source +According to the given data source ID, return the specific information of this result table + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| bk_data_id | int | no | data source id | +| data_name | string | no | data source name | + +> Note: +> 1. One of the above two must be provided, and both cannot be empty at the same time; +> 2. When bk_data_id is provided, data_name is invalid + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_data_id": 1001 +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk_data_id | int | data source ID | +| data_name | string | data source name | +| data_description | string | data source description | +| mq_cluster_info | dict | message queue cluster information, the sample will have a specific description | +| etl_config | string | cleaning configuration name | +| is_custom_source | bool | Whether user-defined data source | +| creator | string | creator | +| create_time | string | Create time, the format is [2018-10-10 10:00:00]| +| last_modify_user | string | last modified by | +| last_modify_time | string | Last modification time [2018-10-10 10:00:00]| +| token | string | verification code for dataID | + +#### data.mq_cluster_info field description + +| Field | Type | Description | +| -------------- | ------ | ---------------------------------- | +| storage_config | dict | Storage cluster characteristics, the fields under each storage are inconsistent | +| cluster_config | dict | Stores cluster information | +| cluster_type | string | Storage cluster type | +| auth_info | dict | authentication information | + +#### Example results + +```json +{ + "message":"OK", + "code": 200, + "data":{ + "bk_data_id": 1001, + "data_name": "Base Data", + "data_description": "Base data data source", + "mq_cluster_info": { + "storage_config": { + "topic": "bk_monitor_1001", + "partition": 1, + }, + "cluster_config": { + "domain_name": "kafka.domain.cluster", + "port": 80, + }, + "cluster_type": "kafka" + }, + "etl_config": "base report", + "is_custom_source": false, + "creator": "username", + "create_time": "2018-10-10 10:10:10", + "last_modify_user": "username", + "last_modify_time": "2018-10-10 10:10:10", + "source_label": "bk_monitor_collector", + "type_label": "time_series", + "token": "5dc2353d913c45bea43dd8d931745a05" + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_event_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_event_group.md new file mode 100644 index 000000000..720b6f1b7 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_event_group.md @@ -0,0 +1,103 @@ + + +### Function description + +Query an event group ID +Given a data source and business, query specific information + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| event_group_id | int | yes | event group ID | +| with_result_table_info | bool | no | event grouping storage information | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "event_group_id": 123, + "with_result_table_info": true +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk_event_group_id | int | event group ID | +| bk_data_id | int | data source ID | +| bk_biz_id | int | Business ID | +| event_group_name | string | event group name | +| label | string | event label | +| is_enable | bool | whether to enable | +| creator | string | creator | +| create_time | string | creation time | +| last_modify_user | string | last modified by | +| last_modify_time | string | last modification time | +| event_info_list | array | event list | +| shipper_list | list | Result table configuration information | + +#### data.event_info_list specific content description + +| Field | Type | Description | +| ------------ | ------ | ---------------------- | +| bk_event_id | int | event ID | +| event_name | string | event name | +| dimension | list | dimension list, elements are dimension descriptions | + +#### Example results + +```json +{ + "message":"OK", + "code": 200, + "data": { + "event_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "event_group_name": "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", + "event_info_list": [{ + "bk_event_id": 1, + "event_name": "usage for update", + "dimension_list": ["dimension_name"] + },{ + "bk_event_id": 2, + "event_name": "usage for create", + "dimension_list": ["dimension_name"] + }], + "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/en/metadata_get_result_table.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table.md new file mode 100644 index 000000000..69ef63f14 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table.md @@ -0,0 +1,99 @@ + + +### Function description + +Query information about a result table +According to the given result table ID, return the specific information of the result table + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| table_id | string | yes | result table ID | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "table_id": "system.cpu" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| table_id | int | result table ID | +| table_name_zh | string | Chinese name of the result table | +| is_custom_table | bool | Whether to customize the result table | +| schema_type | string | Result table schema configuration scheme, free (no schema configuration), dynamic (dynamic schema), fixed (fixed schema) | +| default_storage | string | Default storage scheme | +| storage_list | list | All storage list, element is string | +| creator | string | creator | +| create_time | string | Create time, the format is [2018-10-10 10:00:00]| +| last_modify_user | string | last modified by | +| last_modify_time | string | Last modification time [2018-10-10 10:00:00]| +| field_list | list | field list | +| label | string | result table label | + +##### Data.field_list specific parameter description + +| key value | type | description | +| ----------------- | ------ | --------------------------------------------------- | +| field_name | string | field name | +| field_type | string | The field type, which can be float, string, boolean and timestamp | +| description | string | Field description information | +| tag | string | Field tag, can be metric, dimemsion, timestamp, group | +| alias_name | string | Inbound alias | +| option | string | Field option configuration, key is option name, value is option configuration | +| is_config_by_user | bool | Whether the user enables this field configuration | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{ + "table_id": "system.cpu", + "table_name_en": "Result table name", + "is_custom_table": false, + "scheme_type": "fixed", + "default_storage": "influxdb", + "storage_list": ["influxdb"], + "creator": "username", + "create_time": "2018-10-10 10:10:10", + "last_modify_user": "username", + "last_modify_time": "2018-10-10 10:10:10", + "field_list": [{ + "field_name": "usage", + "field_type": "float", + "tag": "dimension", + "description": "CPU usage", + "is_config_by_user": true + }], + "bk_biz_id": 0, + "label": "OS" + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table_storage.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table_storage.md new file mode 100644 index 000000000..d9880f986 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_result_table_storage.md @@ -0,0 +1,94 @@ + + +### Function description + +Query the specified storage information of a result table +According to the given result table ID, return the specific storage cluster information of the result table + +### Request interface + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| result_table_list | string | yes | result table ID | +| storage_type | string | yes | storage type | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "result_table_list": "system.cpu", + "storage_type": "elasticsearch" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| table_id | int | result table ID | +| storage_info | list | storage cluster information | + +###### For storage_info, the content of each element is described as follows + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| storage_config | dict | Storage cluster characteristics, the fields under each storage are inconsistent | +| cluster_config | dict | Stores cluster information | +| cluster_type | string | Storage cluster type | +| auth_info | dict | authentication information | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{ + "system.cpu": { + "table_id": "system.cpu", + "storage_info": [{ + "storage_config": { + "index_datetime_format": "%Y%m%h", + "slice_size": 400, + "slice_gap": 120, + "retention": 30 + }, + "cluster_config": { + "domain_name": "service.consul", + "port": 1000, + "schema": "http", + "is_ssl_verify": false, + "cluster_id": 1, + "cluster_name": "default_es_storage" + }, + "cluster_type": "elasticsearch", + "auth_info": { + "username": "admin", + "password": "password" + } + }] + } + + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_time_series_group.md new file mode 100644 index 000000000..63c335c8f --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_get_time_series_group.md @@ -0,0 +1,133 @@ + + +### Function description + +Query a custom time series group ID +Given a data source and business, query specific information + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| time_series_group_id | int | yes | custom time series group ID | +| with_result_table_info | bool | no | custom time series group storage information | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "time_series_group_id": 123, + "with_result_table_info": true +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk_time_series_group_id | int | Custom time series group ID | +| bk_data_id | int | data source ID | +| bk_biz_id | int | Business ID | +| time_series_group_name | string | User-defined time series group name | +| label | string | Custom time series label | +| is_enable | bool | whether to enable | +| creator | string | creator | +| create_time | string | creation time | +| last_modify_user | string | last modified by | +| last_modify_time | string | last modification time | +| metric_info_list | list | Metric info list | +| shipper_list | dict | Result table configuration information | + +#### data.metric_info_list specific content description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| description | string | description | +| field_name | string | Field 名 | +| unit | string | unit | +| type | string | unit type | +| tag_list | list | tag list | + +#### data.metric_info_list.tag_list specific description + +| Field | Type | Description | +| ----------- | ------ | -------- | +| field_name | string | field name | +| description | string | description | +| unit | string | unit | +| type | string | unit type | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { + "time_series_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "time_series_group_name": "Custom 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/en/metadata_list_label.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_label.md new file mode 100644 index 000000000..df3e86140 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_label.md @@ -0,0 +1,98 @@ + + +### Function description + +Get data labels +According to the parameters of the request, each request data tag is returned, including the data source tag and the result table tags at all levels + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| label_type | string | yes | label classification, `source_label`, `type_label` or `result_table_label` | +| level | int | yes | label level, the level starts from 1, this configuration only takes effect when `label_type` is `result_table` | +| include_admin_only | bool | yes | whether to show admin visible labels | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "include_admin_only": True, + "level": 1, + "label_type": "source_label" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| label_id | string | Label ID (English name) +| label_name | string | Label name (Chinese name) | +| label_type | string | Label classification | +| level | int | Label level | +| parent_label | string | Parent label ID | +| index | int | Sort order of tags at the same level | + + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { + "source_label": [{ + "label_id": "bk_monitor_collector", + "label_name": "Blue Whale Monitoring Collector", + "label_type": "source_label", + "level": null, + "parent_label": null, + "index": 0 + }], + "type_label": [{ + "label_id": "time_series", + "label_name": "Time Series Data", + "label_type": "type_label", + "level": null, + "parent_label": null, + "index": 0 + }], + "result_table_label": [{ + "label_id": "OS", + "label_name": "operating system", + "label_type": "result_table_label", + "level": 2, + "parent_label": "host", + "index": 0 + }, { + "label_id": "host", + "label_name": "Host", + "label_type": "result_table_label", + "level": 1, + "parent_label": null, + "index": 1 + }] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_result_table.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_result_table.md new file mode 100644 index 000000000..02121414f --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_result_table.md @@ -0,0 +1,105 @@ + + +### Function description + +get storage list +According to the given filter parameters (no currently available), return a list of result tables that meet the conditions + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters +No request parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| datasource_type | string | No | The result table type to be filtered, such as system | +| bk_biz_id | int | No | Get the result table information under the specified business | +| is_public_include | int | No | Whether to include the full business result table, 0 means not included, non-0 means include the full business result table | +| is_config_by_user | bool | no | whether to include non-user-config result table content | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 123, + "is_public_include": 1, + "datasource_type": "system" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| result_table_id | int | result table ID | +| table_name_zh | string | Chinese name of the result table | +| is_custom_table | bool | Whether to customize the result table | +| schema_type | string | Result table schema configuration scheme, free (no schema configuration), dynamic (dynamic schema), fixed (fixed schema) | +| default_storage | string | Default storage scheme | +| storage_list | array | All storage list, element is string | +| creator | string | creator | +| create_time | string | Create time, the format is [2018-10-10 10:00:00]| +| last_modify_user | string | last modified by | +| last_modify_time | string | Last modification time [2018-10-10 10:00:00]| +| field_list | list | field list | + +##### Data.field_list specific parameter description + +| key value | type | description | +| ----------------- | ------ | --------------------------------------------------- | +| field_name | string | field name | +| field_type | string | The field type, which can be float, string, boolean and timestamp | +| description | string | Field description information | +| tag | string | Field tag, can be metric, dimemsion, timestamp, group | +| alias_name | string | Inbound alias | +| option | string | Field option configuration, key is option name, value is option configuration | +| is_config_by_user | bool | Whether the user enables this field configuration | +| unit | string | field unit | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":[{ + "table_id": "system.cpu", + "table_name_en": "Result table name", + "is_custom_table": false, + "scheme_type": "fixed", + "default_storage": "influxdb", + "storage_list": ["influxdb"], + "creator": "username", + "create_time": "2018-10-10 10:10:10", + "last_modify_user": "username", + "last_modify_time": "2018-10-10 10:10:10", + "field_list": [{ + "field_name": "usage", + "field_type": "float", + "tag": "dimension", + "description": "CPU usage", + "is_config_by_user": true, + "unit": "Field Unit" + }], + "bk_biz_id": 0, + "label": "OS" + }], + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_transfer_cluster.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_transfer_cluster.md new file mode 100644 index 000000000..a0a67bc35 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_list_transfer_cluster.md @@ -0,0 +1,56 @@ +### Function description + +Get all transfer cluster information + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +No request parameters + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ---------- | ------ | -------------- | +| cluster_id | string | transfer cluster ID | + +#### Example results + +```json +{ + "message": "OK", + "code": 200, + "data": [ + { + "cluster_id": "default" + }, + { + "cluster_id": "bkmonitorv3-na" + } + ], + "result": true, + "request_id": "408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_cluster_info.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_cluster_info.md new file mode 100644 index 000000000..080474ac6 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_cluster_info.md @@ -0,0 +1,105 @@ + + +### Function description + +Query Storage Cluster Configuration +Create a storage cluster configuration based on the given configuration parameters + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| cluster_id | int | yes | cluster id | +| cluster_name | string | yes | storage cluster name | +| operator | string | Yes | modified by | +| description | string | No | Storage cluster description information | +| auth_info | dict | no | cluster username | +| custom_label | string | no | custom label | +| schema | string | No | Forcibly configure schema, which can be used to configure https and other situations | +| is_ssl_verify | bool | no | whether to skip SSL\TLS verification | + +**Note**: Whether the above information can be modified mainly depends on whether the modification parameters will cause the loss of historical data; for example, modifying domain_name requires operation and maintenance intervention, and modification here is not supported + +#### Auth_info description +```json +{ + "username": "username", + "password": "password" +} +``` + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "cluster_id": 1, + "cluster_name": "first_influxdb", + "operator": "admin" +} +``` + +**Note**: The request can provide `cluster_id` or `cluster_name` to locate the cluster information that needs to be modified; but the two are mutually exclusive, and `cluster_id` is preferred + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| cluster_config | dict | cluster information | +| cluster_type | string | cluster type | +| auth_info | dict | cluster username | + +#### Cluster_config details + +| Parameters | Type | Description | +| ------------- | ------ | ----------------- | +| domain_name | string | Cluster domain name | +| port | int | port | +| schema | string | access protocol | +| is_ssl_verify | bool | Is SSL verification strong | +| cluster_id | int | cluster ID | +| cluster_name | string | cluster name | +| version | string | Storage cluster version | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": [{ + "cluster_config": { + "domain_name": "service.consul", + "port": 9052, + "schema": "https", + "is_ssl_verify": true, + "cluster_id": 1, + "cluster_name": "default_influx", + "version": "" + }, + "cluster_type": "influxDB", + "auth_info": { + "password": "", + "username": "" + } + }], + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_data_id.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_data_id.md new file mode 100644 index 000000000..81e5eabac --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_data_id.md @@ -0,0 +1,101 @@ + + +### Function description + +Modify the data source name + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| data_name | string | no | data source name | +| data_id | int | yes | data source id | +| operator | string | Yes | operator | +| data_description | string | no | data source description | +| option | string | No | Data source configuration option content, the format is {`option_name`: `option_value`} | +| is_enable | bool | no | whether the data source is enabled | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "operator": "adminn", + "data_id": 123, + "data_name": "basereport", +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk_data_id | int | result table ID | +| data_id | int | result table ID | +| mq_config | dict | message queue cluster information | +| etl_config | string | clean configuration | +| result_table_list | list | result information table | +| option | dict | Contents of data source configuration options | +| type_label | string | data type label | +| source_label | string | Data source label | +| token | string | Report verification token | +| transfer_cluster_id | string | transfer cluster id | + +#### Data.mq_config field description + +| Field | Type | Description | +| -------------- | ------ | ---------------------------------- | +| storage_config | dict | Storage cluster characteristics, the fields under each storage are inconsistent | +| cluster_config | dict | Stores cluster information | +| cluster_type | string | Storage cluster type | +| auth_info | dict | authentication information | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{ + "bk_data_id": 1001, + "data_id": 1001, + "mq_config": { + "storage_config": { + "topic": "bk_monitor_1001", + "partition": 1, + }, + "cluster_config": { + "domain_name": "kafka.domain.cluster", + "port": 80, + }, + "cluster_type": "kafka" + }, + 'etl_config': '', + 'result_table_list': [], + 'option': {}, + 'type_label': 'time_series', + 'source_label': 'bk_monitor', + 'token': 'xxxxxx', + 'transfer_cluster_id': 'default' + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_event_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_event_group.md new file mode 100644 index 000000000..7e15b4392 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_event_group.md @@ -0,0 +1,116 @@ + + +### Function description + +Modify an event group ID +Given an event group ID, modify some specific information + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| event_group_id | int | yes | event group id | +| event_group_name | string | no | event group name | +| label | string | No | The event grouping label, used to represent the event monitoring object, should reuse the label under the [result_table_label] type | +| operator | string | Yes | operator | +| event_info_list | list | no | event list | +| is_enable | bool | no | whether to disable the event group | + +#### Event_info_list specific description + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | -------- | +| event_name | string | yes | event name | +| dimension | list | Yes | dimension list | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "event_group_id": 123, + "event_group_name": "event_group_name", + "label": "application", + "operator": "system", + "is_enable": true, + "event_info_list": [{ + "event_name": "usage for update", + "dimension_list": ["dimension_name"] + },{ + "event_name": "usage for create", + "dimension_list": ["dimension_name"] + }] +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ----------------- | ------ | ------------ | +| event_group_id | int | event group ID | +| bk_data_id | int | data source ID | +| bk_biz_id | int | Business ID | +| event_group_name | string | event group name | +| label | string | event label | +| is_enable | bool | whether to enable | +| creator | string | creator | +| create_time | string | creation time | +| last_modify_user | string | last modified by | +| last_modify_time | string | last modification time | +| event_info_list | list | event list | + +#### Event_info_list specific content description + +| Field | Type | Description | +| ------------ | ------ | -------- | +| bk_event_id | int | event ID | +| event_name | string | event name | +| dimension | list | dimension list | + +#### Event_info_list.dimension specific content description + +| Field | Type | Description | +| ----------------- | ------ | ---------- | +| dimension_name | string | dimension name | +| dimension_ch_name | string | Chinese name of the dimension | + + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": { + "event_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", + "event_info_list": [] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_result_table.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_result_table.md new file mode 100644 index 000000000..9d0dfdd54 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_result_table.md @@ -0,0 +1,164 @@ +### Function description + +Modify the configuration of a result table +According to the given data source ID, return the specific information of this result table + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| table_id | string | yes | result table ID | +| operator | string | Yes | operator | +| field_list | list | no | full field list | +| table_name_zh | string | No | Chinese name of the result table | +| default_storage | string | no | result table default storage type | +| label | string | Yes | The label of the result table, the secondary label is recorded here, and the corresponding primary label will be derived from the secondary label | +| is_time_field_only | bool | No | Whether the default field only needs time, the default is False, this field only takes effect when the field_list parameter is not empty | +| external_storage | dict | No | Additional storage configuration, the format is {${storage_type}: ${storage_config}}, storage_type can be kafka, influxdb, redis; storage_config is the same as default_storage_config | +| is_enable | bool | no | whether to enable the result table | + + +**Note**: The above `label` should be obtained through the `metadata_get_label` interface, and should not be created by yourself + +###### Parameters: default_storage_config and storage_config -- parameters supported under influxdb +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| source_duration_time | string | No | 30d | Metadata save time, it needs to conform to influxdb format | + +###### Parameters: default_storage_config and storage_config -- parameters supported under kafka +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| partition | int | No | 1 | Stores the number of partitions. Note: This is just a record. If it is a configuration with more than one topic, it needs to be expanded manually through the kafka command line tool | +| retention | int | no | 1800000 | Kafka data retention time, the default is half an hour, in ms | + +###### Parameters: default_storage_config and storage_config -- parameters supported under redis + +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| is_sentinel | bool | no | False | whether sentinel mode | +| master_name | string | no | "" | master name in sentinel mode | + +**Note**: Since redis uses the queue method by default, it is discarded after consumption, so there is no time length configuration + +###### Parameters: default_storage_config and storage_config -- parameters supported under elasticsearch +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| retention | int | no | 30 | index retention time, in days, the default is 30 days | +| slice_size | int | No | 500 | The size threshold to be sliced, the unit is GB, the default is 500GB | +| slice_gap | int | no | 120 | index slice interval, in minutes, default 2 hours | +| index_settings | string | yes | - | index creation configuration, json format | +| mapping_settings | string | no | - | index mapping configuration, **does not contain field definitions**, json format | +| alias_name | string | No | None | Inbound alias | +| option | string | No | {} | Field option configuration, key is option name, value is option configuration | + +**Note**: Whether the above information can be modified mainly depends on whether the modified parameters will cause the loss of historical data + +| Key value | Type | Required | Default value | Description | +| ---- | --- | --- | --- | --- | +| filed_name | string | yes | - | field name | +| field_type | string | yes | - | field type | +| description | string | no | "" | field description | +| tag | string | Yes | - | field type, can be metric or dimension | +| alias_name | string | No | "" | Field alias, which can be changed to this alias when entering the library | +| option | list | no | [] | field configuration options | +| is_config_by_user | bool | no | true | whether to enable | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "table_id": "system.cpu", + "operator": "username", + "field_list": [{ + "filed_name": "usage", + "field_type": "double", + "description": "field description", + "tag": "metric", + "alias_name": "usage_alias", + "option": [], + "is_config_by_user": true + }], + "label": "OS", + "table_name_en": "CPU performance data", + "default_storage": "influxdb" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| table_id | int | result table ID | +| table _name_zh | string | Chinese name of the result table | +| is_custom_table | boolean | Whether to customize the result table | +| schema_type | string | Result table schema configuration scheme, free (no schema configuration), dynamic (dynamic schema), fixed (fixed schema) | +| default_storage | string | Default storage scheme | +| storage_list | list | All storage list, element is string | +| creator | string | creator | +| create_time | string | Create time, the format is [2018-10-10 10:00:00]| +| last_modify_user | string | last modified by | +| last_modify_time | string | Last modification time [2018-10-10 10:00:00]| +| label | string | result table label | +| field_list | list | field list | + +#### Data.field_list field description + +| key value | type | description | +| ----------------- | ------ | --------------------------------------------------- | +| field_name | string | field name | +| field_type | string | The field type, which can be float, string, boolean and timestamp | +| description | string | Field description information | +| tag | string | Field tag, can be metric, dimemsion, timestamp, group | +| alias_name | string | Inbound alias | +| option | string | Field option configuration, key is option name, value is option configuration | +| is_config_by_user | bool | Whether the user enables this field configuration | +| unit | string | field unit | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data":{ + "table_id": "system.cpu", + "table_name_en": "Result table name", + "is_custom_table": false, + "scheme_type": "fixed", + "default_storage": "influxdb", + "storage_list": ["influxdb"], + "creator": "username", + "create_time": "2018-10-10 10:10:10", + "last_modify_user": "username", + "last_modify_time": "2018-10-10 10:10:10", + "field_list": [{ + "field_name": "usage", + "field_type": "float", + "tag": "dimension", + "description": "CPU usage", + "is_config_by_user": true, + "unit": "Field Unit" + }], + "label": "OS" + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_time_series_group.md new file mode 100644 index 000000000..7ed0378f7 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_modify_time_series_group.md @@ -0,0 +1,156 @@ + + +### Function description + +Modify a custom timing group ID +Given a custom timing group ID, modify some specific information + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| time_series_group_id | int | yes | custom time series group ID | +| time_series_group_name | string | yes | custom time series group name | +| label | string | No | The event grouping label, used to represent the custom timing monitoring object, should reuse the label under the [result_table_label] type | +| operator | string | no | operator | +| metric_info_list | bool | no | custom timing list | +| is_enable | bool | no | whether to disable custom timing group | +| field_list | list | no | field list | + +##### Field_list specific parameter description + +| Key value | Type | Required or not | Default value | Description | +| ----------------- | ------ | -------- | ------ | --------------------------------------------------- | +| field_name | string | yes | - | field name | +| field_type | string | yes | - | field type, can be float, string, boolean and timestamp | +| description | string | no | "" | field description information | +| tag | string | yes | - | field tag, can be metric, dimemsion, timestamp, group | +| alias_name | string | No | None | Inbound alias | +| option | string | No | {} | Field option configuration, key is option name, value is option configuration | +| is_config_by_user | bool | yes | true | whether the user enables this field configuration | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "time_series_group_id": 123, + "time_series_group_name": "Custom Time Series Development", + "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 + }] +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ---------------------- | ------ | ---------------- | +| time_series_group_id | int | New time series group ID | +| time_series_group_name | string | Time series group name | +| bk_data_id | int | data source id | +| bk_biz_id | int | business id | +| table_id | string | result table ID | +| label | string | event label | +| is_enable | bool | whether to enable | +| creator | string | Creator | +| create_time | string | creation time | +| last_modify_user | string | Last updated person | +| last_modify_time | string | Last update time | +| metric_info_list | list | Custom time series list | + +#### metric_info_list specific content description + +| Field | Type | Description | +| ----------- | ------ | -------- | +| field_name | string | field name | +| description | string | field description | +| unit | string | unit | +| type | string | field type | +| tag_list | list | list of dimensions | + +#### metric_info_list.tag_list specific content description + +| Field | Type | Description | +| ----------- | ------ | -------- | +| field_name | string | field name | +| description | string | field description | +| unit | string | unit | +| type | string | field type | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": [{ + 'time_series_group_id': 1, + 'time_series_group_name': 'bkunifylogbeat common metrics', + 'bk_data_id': 1100006, + 'bk_biz_id': 0, + 'table_id': 'bkunifylogbeat_common.base', + 'label': 'service_process', + 'is_enable': True, + 'creator': 'system', + 'create_time': '2021-12-07 03:29:51', + 'last_modify_user': 'system', + 'last_modify_time': '2021-12-07 03:29:51', + "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/en/metadata_query_event_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_event_group.md new file mode 100644 index 000000000..ec40ee9cc --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_event_group.md @@ -0,0 +1,108 @@ + + +### Function description + +Batch query event grouping information + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| label | string | no | event grouping label (monitoring object) | +| event_group_name | string | no | event group name | +| bk_biz_id | int | no | business ID | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "label": "application", + "event_group_name": "Event group name", + "bk_biz_id": 123 +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| event_group_id | int | event group ID | +| bk\_data_id | int | data source ID | +| bk\_biz_id | int | Business ID | +| event\_group_name | string | event group name | +| label | string | event label | +| is_enable | bool | whether to enable | +| creator | string | creator | +| create_time | string | creation time | +| last_modify_user | string | last modified by | +| last_modify_time | string | last modification time | +| event_info_list | list | event list | + +#### data.event_info_list specific content description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| bk\_event_id | int | event ID | +| event_name | string | event name | +| dimension | list | dimension list | + +#### data.event_info_list.dimension specific content description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| dimension_name | string | dimension name | +| dimension_ch_name | string | Chinese name of the dimension | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": [{ + "event_group_id": 1001, + "bk_data_id": 123, + "bk_biz_id": 123, + "event_group_name": "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", + "event_info_list": [{ + "bk_event_id": 1, + "event_name": "usage for update", + "dimension_list": [{ + "dimension_name": "field_name" + }] + },{ + "bk_event_id": 2, + "event_name": "usage for create", + "dimension_list": [{ + "dimension_name": "field_name" + }] + }] + }], + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_tag_values.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_tag_values.md new file mode 100644 index 000000000..7e6a43e0c --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_tag_values.md @@ -0,0 +1,59 @@ + + +### Function description + +Query the data source to specify the optional value of the specified tag/dimension + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| table_id | string | yes | result table ID | +| tag_name | string | yes | tag/dimension field name | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "table_id": "2_bkmonitor_time_series_1500514.base", + "tag_name": "target" +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| tag_values ​​| list | value of tag/dimension | + +#### Example results + +```json +{ + "message":"OK", + "code": 200, + "data": { + "tag_values": ["target1", "target2"] + }, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_time_series_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_time_series_group.md new file mode 100644 index 000000000..89cf620ba --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_query_time_series_group.md @@ -0,0 +1,129 @@ + + +### Function description + +Batch query custom time series grouping information + +### request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| label | string | No | Custom time series grouping label (monitoring object) | +| time_series_group_name | string | no | custom time series group name | +| bk_biz_id | int | no | business ID | + + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "label": "application", + "time_series_group_name": "Custom time series group name", + "bk_biz_id": 123 +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | data | +| request_id | string | Request ID | + +#### Data field description + +| Field | Type | Description | +| ---------------------- | ------ | ---------------- | +| time_series_group_id | int | New time series group ID | +| time_series_group_name | string | Time series group name | +| bk_data_id | int | data source id | +| bk_biz_id | int | business id | +| table_id | string | result table ID | +| label | string | event label | +| is_enable | bool | whether to enable | +| creator | string | Creator | +| create_time | string | creation time | +| last_modify_user | string | Last updated person | +| last_modify_time | string | Last update time | +| metric_info_list | list | Custom time series list | + +#### metric_info_list specific content description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| field_name | string | field name | +| description | string | field description | +| unit | string | unit | +| type | string | field type | +| tag_list | list | list of dimensions | + +#### metric_info_list.tag_list specific content description + +| Field | Type | Description | +| ------------------- | ------ | -------- | +| field_name | string | field name | +| description | string | field description | +| unit | string | unit | +| type | string | field type | + +#### Example results + +```json +{ + "message":"OK", + "code":200, + "data": [{ + 'time_series_group_id': 1, + 'time_series_group_name': 'bkunifylogbeat common metrics', + 'bk_data_id': 1100006, + 'bk_biz_id': 0, + 'table_id': 'bkunifylogbeat_common.base', + 'label': 'service_process', + 'is_enable': True, + 'creator': 'system', + 'create_time': '2021-12-07 03:29:51', + 'last_modify_user': 'system', + 'last_modify_time': '2021-12-07 03:29:51', + "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/en/metadata_upgrade_result_table.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_upgrade_result_table.md new file mode 100644 index 000000000..e0f2e28a1 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/metadata_upgrade_result_table.md @@ -0,0 +1,48 @@ +### Function description + +Modify a single business result table to upgrade it to a full business result table + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------------- | ------ | ---- | ----------- | +| table_id_list | list | yes | result table ID list | +| operator | string | Yes | operator | + +#### Request example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "operator": "admin", + "table_id_list": ["2_system.cpu", "3_system.cpu"], +} +``` + +### Return result + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | null | data | +| request_id | string | Request ID | + +#### Example results + +```json +{ + "message":"OK", + "code": 200, + "data": null, + "result":true, + "request_id":"408233306947415bb1772a86b9536867" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy.md new file mode 100644 index 000000000..fc7a5810a --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy.md @@ -0,0 +1,303 @@ +### Function description + +Save Alert Strategy + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| :---------- | ------ | ---- | ---------------- | +| action_list | list | yes | action list (Action) | +| bk_biz_id | int | yes | business id | +| item_list | list | yes | monitor item(item) | +| name | string | yes | policy name | +| scenario | string | yes | monitoring object | +| is_enabled | string | No | Whether it is enabled, it is enabled by default| + +#### action_list + +Action currently has only notification type. When creating a policy, if the ID of the notification group is passed in, the notification group will be used. + +| Field | Type | Required | Description | +| --------------------------------- | ------ | ---- | ----------------------- | +| action_type | string | yes | action type (notice) | +| config | dict | yes | action config | +| config.alarm_end_time | string | yes | notification period | +| config.alarm_start_time | string | yes | notification time period | +| config.send_recovery_alarm | bool | yes | whether to send recovery | +| config.alarm_interval | int | yes | notification interval | +| notice_template | dict | no | notification configuration | +| notice_template.anomaly_template | string | no | exception notification template | +| notice_template.recovery_template | string | no | recovery notice template | +| notice_group_list | list | yes | notice group list (NoticeGroup) | + +#### action_list.notice_group_list + +Can use an existing notification group + +1. If there is an id, the notification group corresponding to the id is used, and the incoming notification group configuration will update the notification group. +2. If there is no id, create a new notification group based on the incoming field. + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------------------------------------------------- | +| notice_receiver | list | no | recipients | +| name | string | no | notification group name | +| notice_way | dict | No | The notification method, the alarm level is key, and the value is a list of notification methods | +| message | string | No | Remarks | +| id | int | no | notification group id | + +#### item_list + +| Field | Type | Required | Description | +| ------------------------- | ------ | ---- | --------------------------- | +| rt_query_config | dict | yes | metric query configuration (RtQueryConfig) | +| metric_id | string | yes | metric | +| name | string | yes | item name | +| data_source_label | string | yes | data source | +| algorithm_list | list | yes | algorithm configuration list (Algorithm) | +| no_data_config | dict | yes | no data config | +| no_data_config.is_enabled | bool | yes | whether to enable no data alarm | +| no_data_config.continous | int | no | No data alarm detection cycle number | +| data_type_label | string | yes | data type | +| target | list | yes | monitoring target | + +#### item_list.rt_query_config + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| metric_field | string | yes | metric name | +| unit_conversion | int | yes | unit conversion | +| unit | string | Yes | unit | +| extend_fields | string | no | additional fields | +| agg_condition | list | yes | query condition | +| agg_interval | int | yes | aggregation period | +| agg_dimension | list | yes | query dimension | +| agg_method | string | yes | aggregation method | +| result_table_id | string | yes | result table id | + +#### item_list.algorithm_list + +| Field | Type | Required | Description | +| ---------------------------- | ------ | ---- | -------------- | +| algorithm_config | list | yes | algorithm configuration list | +| level | int | yes | alarm level | +| trigger_config | dict | yes | trigger condition | +| trigger_config.count | int | yes | trigger threshold | +| trigger_config.check_window | int | yes | number of trigger check windows | +| algorithm_type | string | yes | algorithm type | +| recovery_config | dict | yes | recovery_config | +| recovery_config.check_window | int | yes | number of recovery cycles | +| message_template | string | No | | + +#### item_list.target field description + +| Field | Type | Required | Description | +| ------ | ------ | ---- | -------------- | +| field | string | yes | monitoring target type | +| value | dict | yes | monitoring target data item | +| method | string | yes | monitoring target method | + +field - a combination based on target node type and target object type +host_target_ip +host_ip +host_topo +service_topo +service_service_template +service_set_template +host_service_template +host_set_template + +#### item_list.target.value field description + +| Field | Type | Required | Description | +| ----------- | ------ | ---- | -------- | +| ip | string | Yes | target ip | +| bk_cloud_id | string | yes | cloud zone id | + +#### Algorithm configuration + +##### Static Threshold + +The static threshold can be configured more than one at a time, so it is a list structure + +```json +[ + { + "method": "gt", // gt,gte,lt,lte,eq,neq + "threshold": 1 + } +] +``` + +##### Simple chain ratio + +```json +{ + "floor": 1, + "ceil": 1 +} +``` + +##### Simple comparison + +```json +{ + "floor": 1, + "ceil": 1 +} +``` + +##### Advanced chain ratio + +```json +{ + "floor": 1, + "ceil": 1, + "floor_interval": 1, + "ceil_interval": 1 +} +``` + +##### Premium YoY + +```json +{ + "floor": 1, + "ceil": 1, + "floor_interval": 1, + "ceil_interval": 1 +} +``` + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id":2, + "item_list":[ + { + "rt_query_config":{ + "metric_field":"idle", + "agg_dimension":["ip", "bk_cloud_id"], + "unit_conversion":1.0, + "extend_fields":"", + "agg_method":"AVG", + "agg_condition":[], + "agg_interval":60, + "result_table_id":"system.cpu_detail", + "unit":"%" + }, + "metric_id":"bk_monitor.system.cpu_detail.idle", + "name":"\u7a7a\u95f2\u7387", + "data_source_label":"bk_monitor", + "algorithm_list":[ + { + "algorithm_config":[[ + { + "threshold":0.1, + "method":"gte" + } + ]], + "level":1, + "trigger_config":{ + "count":1, + "check_window":5 + }, + "algorithm_type":"Threshold", + "recovery_config":{ + "check_window":5 + }, + "message_template":"" + } + ], + "no_data_config":{ + "is_enabled":false, + "continuous":5 + }, + "data_type_label":"time_series", + "name":"\u7a7a\u95f2\u7387", + "target":[ + [ + { + "field":"bk_target_ip", + "method":"eq", + "value":[ + { + "ip":"127.0.0.1", + "bk_cloud_id":0 + } + ] + } + ] + ] + } + ], + "scenario":"os", + "action_list":[ + { + "notice_template":{ + "anomaly_template":"aa", + "recovery_template":"" + }, + "notice_group_list":[ + { + "notice_receiver":[ + "user#test" + ], + "name":"test", + "notice_way":{ + "1":["weixin"], + "3":["weixin"], + "2":["weixin"] + }, + "message":"", + "notice_group_name":"test", + "id":1 + } + ], + "action_type":"notice", + "config":{ + "alarm_end_time":"23:59:59", + "send_recovery_alarm":false, + "alarm_start_time":"00:00:00", + "alarm_interval":120 + } + } + ], + "name":"test" +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| ----------- | ---- | ------ | +| strategy_id | int | strategy id | + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "data": { + "strategy_id": 1 + }, + "message": "" +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy_v2.md new file mode 100644 index 000000000..a3d208ce9 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_alarm_strategy_v2.md @@ -0,0 +1,483 @@ +### Function description + +Save Alert Policy + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters +| Field | Type | Required | Description | +| :--------- | ------- | ---- | -------------------- | +| actions | list | yes | action list (Action) | +| bk_biz_id | int | yes | business id | +| detects | list | Yes | Detect configuration list (Detect) | +| id | int | no | policy id | +| items | list | yes | item list (Item) | +| labels | list | yes | list of policy labels | +| name | string | yes | policy name | +| scenario | string | yes | monitoring object | +| source | string | yes | monitoring source | +| is_enabled | bool | No | Whether to enable, default enabled | + +#### actions + +| Field | Type | Required | Description | +| --------------------------------- | ------ | ---- | ---------------- | +| id | int | Yes | action id | +| type | string | yes | action type (notice) | +| config | dict | yes | action config | +| config.alarm_end_time | string | yes | notification period | +| config.alarm_start_time | string | yes | notification time period | +| config.send_recovery_alarm | bool | yes | whether to send recovery | +| config.alarm_interval | int | yes | notification interval | +| notice_template | dict | no | notification configuration | +| notice_template.anomaly_template | string | no | exception notification template | +| notice_template.recovery_template | string | no | recovery notice template | +| notice_group_ids | list | yes | list of notice group IDs | + +#### detects + +| Field | Type | Required | Description | +| ---------------------------- | ------ | ---- | ---------------- | +| id | int | yes | detection id | +| level | int | yes | alarm level | +| expression | string | yes | calculation formula | +| trigger_config | dict | yes | trigger condition configuration | +| trigger_config.count | int | yes | number of triggers | +| trigger_config.check_window | int | yes | trigger period | +| recovery_config | dict | yes | recovery condition config | +| recovery_config.check_window | int | yes | recovery period | +| connector | string | yes | same-level algorithm connector | + +#### items + +| Field | Type | Required | Description | +| ---------------------------- | ------ | ---- | ------------------------- | +| query_configs | list | yes | metrics query configuration (QueryConfig) | +| id | string | yes | monitoring item configuration id | +| name | string | yes | item name | +| expression | string | yes | calculation formula | +| origin_sql | string | yes | origin sql | +| algorithms | list | yes | algorithm configuration list (Algorithm) | +| no_data_config | dict | yes | no data config | +| no_data_config.is_enabled | bool | yes | whether to enable no data alarm | +| no_data_config.continuous | int | no | No data alarm detection cycle number | +| target | list | yes | monitoring target | + +#### iterms.target + +| Field | Type | Required | Description | +| ---------------------------- | ------ | ---- | ----------------------- | +| field | string | yes | monitoring target type | +| value | dict | yes | monitoring target data item | +| method | string | yes | monitoring target method | + +field - a combination based on target node type and target object type +host_target_ip +host_ip +host_topo +service_topo +service_service_template +service_set_template +host_service_template +host_set_template + +#### items.target.value + +| Field | Type | Required | Description | +| ----------- | ------ | ---- | -------- | +| ip | string | Yes | target ip | +| bk_cloud_id | string | yes | cloud zone id | + +```json +{ + "target": [ + [ + { + "field": "host_topo_node", + "method": "eq", + "value": [ + { + "bk_inst_id": 7, + "bk_obj_id": "biz" + } + ] + } + ] + ] +} +``` + +#### queryconfigs + +| Field | Type | Required | Description | +| ----------------- | ------ | ---- | ------------ | +| alias | string | Yes | alias | +| data_source_label | string | yes | data source label | +| data_type_label | string | yes | data type label | + +##### BkMonitorTimeSeries type + +```json +{ + "data_source_label": "bk_monitor", + "data_type_label": "time_series" +} +``` + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| metric_field | string | yes | metric | +| unit | string | Yes | unit | +| agg_condition | list | yes | query condition | +| agg_dimension | list | Yes | aggregate dimension | +| agg_method | string | yes | aggregation method | +| agg_interval | int | yes | aggregation period | +| result_table_id | string | yes | result table id | + +##### BkMonitorLog type + +```json +{ + "data_source_label": "bk_monitor", + "data_type_label": "log" +} +``` + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| agg_method | string | yes | aggregation method | +| agg_condition | list | yes | query condition | +| result_table_id | string | yes | result table | +| agg_interval | int | yes | aggregation period | + +##### BkMonitorEvent Type + +```json +{ + "data_source_label": "bk_monitor", + "data_type_label": "event" +} +``` + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| metric_field | string | yes | metric | +| agg_condition | list | yes | query condition | +| result_table_id | string | yes | result table | + +##### BkLogSearchTimeSeries type + +```json +{ + "data_source_label": "bk_log_search", + "data_type_label": "time_series" +} +``` + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| metric_field | string | yes | metric | +| index_set_id | int | yes | index set id | +| agg_condition | list | yes | query condition | +| agg_dimension | list | Yes | aggregate dimension | +| agg_method | string | yes | aggregation method | +| result_table_id | string | yes | index | +| agg_interval | int | yes | aggregation period | +| time_field | string | yes | time field | +| unit | string | Yes | unit | + +##### BkLogSearchLog type + +```json +{ + "data_source_label": "bk_log_search", + "data_type_label": "log" +} +``` + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| index_set_id | int | yes | index set id | +| agg_condition | list | yes | query condition | +| query_string | int | yes | query statement | +| agg_dimension | list | Yes | aggregate dimension | +| result_table_id | string | yes | index | +| agg_interval | int | yes | aggregation period | +| time_field | string | yes | time field | + +##### CustomEvent Type + +```json +{ + "data_source_label": "custom", + "data_type_label": "event" +} +``` + +| Field | Type | Required | Description | +| ----------------- | ------ | ---- | -------------- | +| custom_event_name | string | yes | custom event name | +| agg_condition | list | yes | query condition | +| agg_interval | int | yes | aggregation period | +| agg_dimension | list | yes | query dimension | +| agg_method | string | yes | aggregation method | +| result_table_id | string | yes | result table id | + +##### CustomTimeSeries type + +```json +{ + "data_source_label": "custom", + "data_type_label": "time_series" +} +``` +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| metric_field | string | yes | metric | +| unit | string | Yes | unit | +| agg_condition | list | yes | query condition | +| agg_dimension | list | Yes | aggregate dimension | +| agg_method | string | yes | aggregation method | +| agg_interval | int | yes | aggregation period | +| result_table_id | string | yes | result table id | + +##### BkDataTimeSeries type + +```json +{ + "data_source_label": "bk_data", + "data_type_label": "time_series" +} +``` + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | -------- | +| metric_field | string | yes | metric | +| unit | string | Yes | unit | +| agg_condition | list | yes | query condition | +| agg_dimension | list | Yes | aggregate dimension | +| agg_method | string | yes | aggregation method | +| agg_interval | int | yes | aggregation period | +| result_table_id | string | yes | result table | +| time_field | string | yes | time field | + +#### algorithms + +| Field | Type | Required | Description | +| ----------- | ------ | ---- | ------------ | +| config | list | yes | algorithm configuration list | +| level | int | yes | alarm level | +| type | string | yes | algorithm type | +| unit_prefix | string | no | algorithm unit prefix | + +#### Algorithm configuration config + +##### Static Threshold Threshold + +```json +[ + { + "method": "gt", // gt,gte,lt,lte,eq,neq + "threshold": "1" + } +] +``` + +##### Simple Ring Ratio SimpleRingRatio + +```json +{ + "floor": "1", + "ceil": "1" +} +``` + +##### Simple compared to SimpleYearRound + +```json +{ + "floor": "1", + "ceil": "1" +} +``` + +##### Advanced Ring Ratio AdvancedRingRatio + +```json +{ + "floor": "1", + "ceil": "1", + "floor_interval": 1, + "ceil_interval": 1 +} +``` + +##### Advanced YoY AdvancedYearRound + +Consistent with the configuration format of the advanced chain ratio detection algorithm + +##### Intelligent Anomaly Detection 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 + +Consistent with the year-on-year amplitude configuration format + +##### RingRatioAmplitude + +```json +{ + "ratio": 1, + "shock": 1, + "days": 1, + "threshold": 1 +} +``` + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 7, + "scenario": "os", + "name": "Process port", + "labels": [], + "is_enabled": true, + "items": [ + { + "name": "AVG(CPU usage)", + "no_data_config": { + "continuous": 10, + "is_enabled": false, + "agg_dimension": [ + "bk_target_ip", + "bk_target_cloud_id" + ], + "level": 2 + }, + "target": [], + "expression": "a", + "origin_sql": "", + "query_configs": [ + { + "data_source_label": "bk_monitor", + "data_type_label": "time_series", + "alias": "a", + "result_table_id": "system.cpu_summary", + "agg_method": "AVG", + "agg_interval": 60, + "agg_dimension": [ + "bk_target_ip", + "bk_target_cloud_id" + ], + "agg_condition": [], + "metric_field": "usage", + "unit": "percent", + "metric_id": "bk_monitor.system.cpu_summary.usage", + "index_set_id": "", + "query_string": "*", + "custom_event_name": "usage", + "functions": [], + "time_field": "time", + "bkmonitor_strategy_id": "usage", + "alert_name": "usage" + } + ], + "algorithms": [ + { + "level": 1, + "type": "Threshold", + "config": [ + [ + { + "method": "gte", + "threshold": "80" + } + ] + ], + "unit_prefix": "%" + } + ] + } + ], + "detects": [ + { + "level": 1, + "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": "" + } + } + ] +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": {data returns the saved policy structure, consistent with the request parameters (omitted in the sample data)} +} +``` + + + + + diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_notice_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_notice_group.md new file mode 100644 index 000000000..8512c6d1d --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/save_notice_group.md @@ -0,0 +1,103 @@ +### Function description + +save alarm group + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| --------------- | ------ | ---- | ------------------------ | +| bk_biz_id | int | yes | business id | +| name | string | Yes | name | +| message | string | yes | description | +| webhook_url | string | no | callback address | +| notice_way | dict | yes | notification methods for each level | +| id | int | no | alarm group ID, if not created | +| notice_receiver | list | yes | list of notification objects | +| wxwork_group | dict | No | Enterprise WeChat Robot | + +#### notice_receiver - list of notification objects + +Notification objects have two types `user` or `group`. + +1. The notification object corresponding to user is the user name +2. group corresponds to the notification group +1. operator - the main person in charge +2. bk_bak_operator - backup manager +3. bk_biz_tester - test +4. bk_biz_productor - Product +5. bk_biz_maintainer --Luck +6. bk_biz_developer - Development + +#### notice_way - notice method + +Notification methods for each alarm level + +The basic notification methods are: + +*weixin +* mail +* voice +* sms + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 2, + "notice_receiver": [ + { + "type": "user", + "id": "admin" + } + ], + "name": "layman", + "notice_way": { + "1": ["weixin"], + "2": ["weixin"], + "3": ["weixin"] + }, + "webhook_url": "https://www.qq.com", + "message": "Test Notification", + "id": 1, + "wxwork_group": { + "1": "Group session ID", + "2": "Group session ID", + "3": "Group Session ID" + } +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| --------------- | ------ | ------------------ | +| id | int | Alarm ID | + +#### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": { + "id": 1 + }, + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy.md new file mode 100644 index 000000000..e8f3bf57c --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy.md @@ -0,0 +1,270 @@ +### Function description + +Querying the Alarm Policy + +### request parameters + +{{ common_args_desc }} + +#### interface parameters + +| Field | Type | Required | Description | +| --------- | ------ | ---- | ---------- | +| page | int | no | page number | +| page_size | int | no | number of entries per page | +| ids | list | no | list of policy IDs | +| metric_id | string | no | metric ID | +| bk_biz_id | int | yes | business id | +| fields | list | no | required fields | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_id": 2, + "ids": [1, 2] +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| :---------- | ------ | ---------------- | +| action_list | list | Action list (Action) | +| source_type | string | data source | +| target | list | monitoring targets | +| bk_biz_id | int | Business ID | +| item_list | list | Monitoring items (Item) | +| name | string | Policy name | +| scenario | string | monitoring object | +| id | int | Policy ID | + +#### data.action_list + +| Field | Type | Description | +| --------------------------------- | ------ | ----------------------- | +| action_type | string | action type (notice) | +| config | dict | Action configuration | +| config.alarm_end_time | string | notification period | +| config.alarm_start_time | string | notification time period | +| config.send_recovery_alarm | bool | whether to send recovery | +| config.alarm_interval | int | notification interval | +| notice_template | dict | notification configuration | +| notice_template.anomaly_template | string | Anomaly notification template | +| notice_template.recovery_template | string | Recovery notice template | +| notice_group_list | list | NoticeGroup list | + +#### data.action_list.notice_group_list + +| Field | Type | Description | +| --------------- | ------ | -------------------------------------------------- | +| notice_receiver | list | recipients | +| name | string | Notification group name | +| notice_way | dict | The notification method, the alarm level is key, and the value is a list of notification methods | +| message | string | Remarks | +| id | int | notification group ID | + +#### item_list + +| Field | Type | Description | +| ------------------------- | ------ | --------------------------- | +| rt_query_config | dict | Metric query configuration (RtQueryConfig) | +| metric_id | string | metric | +| name | string | item name | +| data_source_label | string | data source | +| algorithm_list | list | Algorithm configuration list (Algorithm) | +| no_data_config | dict | no data config | +| no_data_config.is_enabled | bool | Whether to enable no data alarm | +| no_data_config.continous | int | No data alarm detection cycle number | +| data_type_label | string | data type | + +#### item_list.rt_query_config + +| Field | Type | Description | +| --------------- | ------ | -------- | +| metric_field | string | metric name | +| unit_conversion | int | unit conversion | +| unit | string | unit | +| extend_fields | string | other fields | +| agg_condition | list | query condition | +| agg_interval | int | aggregation period | +| agg_dimension | list | query dimension | +| agg_method | string | Aggregation method | +| result_table_id | string | result table ID | + +#### item_list.algorithm_list + +| Field | Type | Description | +| ---------------------------- | ------ | -------------- | +| algorithm_config | list | algorithm configuration list | +| level | int | Alarm level | +| trigger_config | dict | trigger condition | +| trigger_config.count | int | trigger threshold | +| trigger_config.check_window | int | Number of trigger check windows | +| algorithm_type | string | algorithm type | +| recovery_config | dict | recovery_config | +| recovery_config.check_window | int | number of recovery cycles | +| message_template | string | | + +#### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": [ + { + "bk_biz_id": 2, + "item_list": [ + { + "update_time": "2019-11-22 14:50:23+0800", + "data_type_label": "time_series", + "metric_id": "bk_monitor.system.cpu_detail.idle", + "item_name": "Idle Rate", + "strategy_id": 1, + "data_source_label": "bk_monitor", + "algorithm_list": [ + { + "algorithm_config": [[ + { + "threshold": 0.1, + "method": "gte" + } + ]], + "update_time": "2019-11-22 14:50:23+0800", + "trigger_config": { + "count": 1, + "check_window": 5 + }, + "strategy_id": 1, + "level": 1, + "algorithm_type": "Threshold", + "recovery_config": { + "check_window": 5 + }, + "create_time": "2019-11-22 14:50:23+0800", + "algorithm_id": 19, + "message_template": "", + "item_id": 2, + "id": 19 + } + ], + "no_data_config": { + "is_enabled": false, + "continuous": 5 + }, + "create_time": "2019-10-26 15:54:18+0800", + "rt_query_config_id": 2, + "item_id": 2, + "rt_query_config": { + "update_time": "2019-11-22 14:50:23+0800", + "metric_field": "idle", + "agg_dimension": [ + "ip", + "bk_cloud_id" + ], + "unit_conversion": 1, + "result_table_id": "system.cpu_detail", + "extend_fields": "", + "create_time": "2019-10-26 15:54:18+0800", + "rt_query_config_id": 2, + "agg_method": "AVG", + "agg_condition": [], + "agg_interval": 60, + "id": 2, + "unit": "%" + }, + "id": 2, + "name": "Idle Rate" + } + ], + "update_time": "2019-11-22 14:50:23+0800", + "target": [ + [ + { + "field": "bk_target_ip", + "method": "eq", + "value": [ + { + "bk_target_ip": "10.0.0.1", + "bk_target_cloud_id": 0 + } + ] + } + ] + ], + "scenario": "os", + "strategy_id": 1, + "action_list": [ + { + "update_time": "2019-11-22 14:50:24+0800", + "notice_template": { + "recovery_template": "", + "update_time": "2019-11-22 14:50:24+0800", + "create_time": "2019-10-26 15:54:19+0800", + "anomaly_template": "aa", + "action_id": 2 + }, + "id": 2, + "notice_group_list": [ + { + "update_time": "2019-11-18 17:51:54+0800", + "notice_receiver": [ + { + "type": "user", + "id": "admin" + } + ], + "name": "user group", + "notice_way": { + "1": [ + "weixin" + ], + "2": [ + "weixin" + ], + "3": [ + "weixin" + ] + }, + "create_time": "2019-11-18 17:51:54+0800", + "notice_group_id": 5, + "message": "asdf", + "notice_group_name": "user group", + "id": 5 + } + ], + "create_time": "2019-10-26 15:54:18+0800", + "action_type": "notice", + "config": { + "alarm_end_time": "23:59:59", + "send_recovery_alarm": false, + "alarm_start_time": "00:00:00", + "alarm_interval": 120 + }, + "strategy_id": 1, + "action_id": 2 + } + ], + "source_type": "BKMONITOR", + "strategy_name": "test", + "create_time": "2019-10-23 21:34:12+0800", + "id": 1, + "name": "test" + } + ], + "result": true +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy_v2.md new file mode 100644 index 000000000..d228eb554 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_alarm_strategy_v2.md @@ -0,0 +1,346 @@ +### Function description + +Querying the Alarm Policy List + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| --------- | ------ | ---- | ---------- | +| page | int | yes | page number | +| page_size | int | yes | number of entries per page | +| conditions| list | yes | query conditions | +| bk_biz_id | int | yes | business id | +| scenario | string | no | monitoring scenario | +| with_notice_group | bool | yes | whether to supplement notification group information | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "page": 1, + "page_size": 10, + "conditions": [ + { + "key": "strategy_id", + "value": [ + "36" + ] + } + ], + "bk_biz_id": 7, + "with_notice_group": false +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### data field description + +| Field | Type | Description | +| :---------- | ------ | ---------------- | +| data_source_list | list | Data Source List (DataSource) | +| notice_group_list | list | NoticeGroup list | +| scenario_list | list | List of monitored objects (Scenario) | +| strategy_config_list | list | Strategy Configuration List (StrategyConfig)| +| strategy_label_list | list | Strategy Label List (StrategyLabel) | + +#### data.data_source_list + +| Field | Type | Description | +| --------------------------------- | ------ | ----------------------- | +| type | string | data type | +| name | string | data name | +| data_type_label | string | data type label | +| data_source_label| string | data source label | +| count | int | Count the number of policies by data source | + +#### data.notice_group_list + +| Field | Type | Description | +| --------------- | ------ | ------------- | +| notice_group_id | int | notification group ID | +| notice_group_name| string | notice group name | +| count | int | Number of policies by notification group | + +#### data.scenario_list + +| Field | Type | Description | +| ------------------------- | ------ | --------------------------- | +| id | int | Monitoring object ID | +| display_name | string | monitor object name | +| count | int | The number of policies by monitoring object | + +#### data.strategy_config_list + +| Field | Type | Required | Description | +| :---------------------- | ------ | ---- | ------------ | +| actions | list | yes | action list | +| source | string | Yes | policy source | +| detects | list | yes | list of detection configurations | +| id | int | yes | policy id | +| items | list | yes | item list | +| labels | list | yes | list of policy labels | +| name | string | yes | policy name | +| scenario | string | yes | monitoring object | +| is_enabled | bool | no | is it enabled | +| update_time | string | no | policy creation time | +| create_time | string | No | Create policy time | +| update_user | string | no | create policyr | +| create_user | string | no | create policyr | +| alert_count | int | no | number of alerts | +| type | string | no | policy type | +| target_object_type | string | no | target object type | +| shield_info | dict | no | shield configuration info | +| shield_info.is_shielded | bool | no | is shielded | +| add_allowed | bool | no | add_allowed | +| data_source_type | string | no | data source type | +| bk_biz_id | int | yes | business id | + +#### data.strategy_config_list.actions + +| Field | Type | Description | +| --------------------------------- | ------ | ----------------------- | +| action_type | string | action type (notice) | +| config | dict | Action configuration | +| config.alarm_end_time | string | notification period | +| config.alarm_start_time | string | notification time period | +| config.send_recovery_alarm | bool | whether to send recovery | +| config.alarm_interval | int | notification interval | +| notice_template | dict | notification configuration | +| notice_template.anomaly_template | string | Anomaly notification template | +| notice_template.recovery_template | string | Recovery notice template | +| notice_group_list | list | NoticeGroup list | + +#### data.strategy_config_list.actions.notice_group_list + +| Field | Type | Description | +| --------------- | ------ | -------------------------------------------------- | +| notice_receiver | list | recipients | +| name | string | Notification group name | +| notice_way | dict | The notification method, the alarm level is key, and the value is a list of notification methods | +| message | string | Remarks | +| id | int | notification group ID | + +#### data.strategy_config_list.detects + +| Field | Type | Description | +| ---------------------------- | ------ | ---------------- | +| id | int | detection id | +| level | int | Alarm level | +| expression | string | Calculation formula | +| trigger_config | dict | trigger condition configuration | +| trigger_config.count | int | number of triggers | +| trigger_config.check_window | int | trigger period | +| recovery_config | dict | recovery condition configuration | +| recovery_config.check_window | int | recovery period | +| connector | string | same-level algorithm connector | + +#### data.strategy_config_list.items + +| Field | Type | Description | +| ------------------------- | ------ | --------------------------- | +| rt_query_config | dict | Metric query configuration (RtQueryConfig) | +| metric_id | string | metric | +| name | string | item name | +| data_source_label | string | data source | +| algorithm_list | list | Algorithm configuration list (Algorithm) | +| no_data_config | dict | no data config | +| no_data_config.is_enabled | bool | Whether to enable no data alarm | +| no_data_config.continous | int | No data alarm detection cycle number | +| data_type_label | string | data type | + +#### data.strategy_config_list.item_list.rt_query_config + +| Field | Type | Description | +| --------------- | ------ | -------- | +| metric_field | string | metric name | +| unit_conversion | int | unit conversion | +| unit | string | unit | +| extend_fields | string | other fields | +| agg_condition | list | query condition | +| agg_interval | int | aggregation period | +| agg_dimension | list | query dimension | +| agg_method | string | Aggregation method | +| result_table_id | string | result table ID | + +#### data.strategy_config_list.items.algorithm_list + +| Field | Type | Description | +| ---------------------------- | ------ | -------------- | +| algorithm_config | list | algorithm configuration list | +| level | int | Alarm level | +| trigger_config | dict | trigger condition | +| trigger_config.count | int | trigger threshold | +| trigger_config.check_window | int | Number of trigger check windows | +| algorithm_type | string | algorithm type | +| recovery_config | dict | recovery_config | +| recovery_config.check_window | int | number of recovery cycles | +| message_template | string | | + +#### data.strategy_label_list + +| Field | Type | Description | +| --------------- | ------ | -------- | +| label_name | string | Policy label name | +| id | int | Policy Tag ID | +| count | string | Policy count by policy label | + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": { + "scenario_list": [ + { + "id": "application_check", + "display_name": "Business Application", + "count": 0 + } + ], + "strategy_config_list": [ + { + "id": 36, + "version": "v2", + "bk_biz_id": 7, + "name": "Process port", + "source": "bk_monitorv3", + "scenario": "host_process", + "type": "monitor", + "items": [ + { + "id": 36, + "name": "Process port", + "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": "Process Port" + } + ], + "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": "", + "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": "System Events" + } + ], + "notice_group_list": [ + { + "notice_group_id": 11, + "notice_group_name": "The person in charge of the active and standby", + "count": 1 + } + ], + "data_source_list": [ + { + "type": "bk_monitor_time_series", + "name": "Monitoring Collection Metrics", + "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/en/search_event.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_event.md new file mode 100644 index 000000000..5db2317fd --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_event.md @@ -0,0 +1,264 @@ +### Function description + +query event + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ---------- | ------ | ---- | ------------------------------------------------------------ | +| bk_biz_ids | list | yes | list of business IDs | +| time_range | string | No | The time range when the event ends, in the format: 2020-02-26 00:00:00 -- 2020-02-28 23:59:59 | +| days | int | No | Query the time in the last few days, this parameter exists, time_range is invalid | +| conditions | list | no | query conditions | +| page | int | No | The number of pages, no pagination if not passed | +| page_size | int | no | number of pages per page, default 100 | + +> It should be noted that the currently unrecovered events are not constrained by time conditions, that is, no matter what time range is selected, the current unrecovered events will be detected unless conditions are used to filter the event status. + +#### conditions + +Conditions are used to filter events by other fields related to the event. They are composed of key and value, which means that events in the value list are filtered out of the key field. + +The following matching conditions indicate that the events whose event status is "Recovered" are filtered out. + +```json +[ + { + "key":"event_status", + "value":["RECOVERED"] + } +] +``` + +Available fields are: + +1. strategy_id - the strategy ID associated with the event + +2. id - Event ID + +3. level - the alarm level + 1. 1- Fatal + 2. 2- Warning + 3. 3- Reminders + + +4. event_status - event status + + 1. ABNORMAL - abnormal + 2. CLOSED - closed + 3. RECOVERED - recovered + +5. data_source - data source and type + + It is a string separated by `|`, the left side is the data source, the right side is the data type, such as `bk_monitor|time_series` + + The data sources are: + +1. bk_monitor - monitor collection +2. bk_data - Data Platform +3. bk_log_search - log retrieval +4. custom - user-defined + +​ The data types are: + +1. time_series - time series data +2. event - event +3. log - log keyword + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_ids":[2], + "time_range":"2020-02-26 00:00:00 -- 2020-02-28 23:59:59", + "conditions":[ + { + "key":"event_status", + "value":[ + "RECOVERED" + ] + }, + { + "key":"data_source", + "value":[ + "bk_monitor|time_series" + ] + } + ], + "page": 1, + "page_size": 100 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | data | + +#### data field description + +| Field | Type | Description | +| ------------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID | +| is_ack | bool | whether to confirm | +| level | int | Alarm level, 1 (execution) 2 (warning) 3 (reminder) | +| origin_alarm | dict | Anomaly point data when the event occurred | +| origin_config | dict | The alarm policy configuration when the event is generated. For data, please refer to the related documents of the alarm policy api | +| strategy_id | int | Alert strategy ID | +| id | int | Event table auto-increment ID | +| is_shielded | bool | is shielded | +| event_id | string | exception event ID | +| status | int | event status, ABNORMAL (not recovered) CLOSED (closed) RECOVERED (recovered) | +| create_time | string | The time when the event was generated, in the format yyyy-mm-dd hh:mm:ss | +| begin_time | string | The creation time of the first anomaly point associated with this event, in the format yyyy-mm-dd hh:mm:ss | +| end_time | string | The end time of the event, in the format yyyy-mm-dd hh:mm:ss | +| target_key | string | event target, empty string if it does not exist | +| p_event_id | string | parent event ID, default is empty | + +#### target key + +Indicates the monitoring target corresponding to the current event. The data format is as follows: + +- host: host|ip|bk_cloud_id +eg: host | 10.0.0.1 | 0 +- Service instance: service|bk_target_service_instance_id +eg: service|13 +- topology node: topo|bk_obj_id|$bk_inst_id +eg: topo|us|2 +- none: "" + +#### origin_alarm + +Represents outlier data at the time of the event + +| Field | Type | Description | +| ----------------------- | ------ | -------------- | +| data | dict | data | +| data.dimensions | dict | data dimensions | +| data.values ​​| dict | values ​​of outliers | +| data.time | int | timestamp of the outlier | +| dimension_translation | dict | Dimension display information | +| anomaly | dict | exception information | +| anomaly.key | string | alarm level | +| anomaly.anomaly_message | string | Exception description | +| anomaly.anomaly_time | string | anomaly time | +| anomaly.anomaly_id | string | Anomaly location ID | + +#### origin_alarm.dimension_translation - dimension display information + +Translate the dimension into the content displayed to the user, corresponding to the information in data.dimensions + +1. display_name - dimension name +2. display_value - the value of the dimension +3. value - the original value of the dimension + +```json +{ + "bk_topo_node": { + "display_name":"bk_topo_node", + "display_value":[ + { + "bk_obj_name":"Cluster", + "bk_inst_name":"Free Machine Pool" + }, + { + "bk_obj_name":"Business", + "bk_inst_name":"Blue Whale" + }, + { + "bk_obj_name":"Module", + "bk_inst_name":"idle machine" + } + ], + "value":[ + "set|2", + "biz|2", + "module|3" + ] + }, + "bk_target_cloud_id":{ + "display_name":"bk_target_cloud_id", + "display_value":0, + "value":0 + }, + "bk_target_ip":{ + "display_name":"bk_target_ip", + "display_value":"10.0.0.1", + "value":"10.0.0.1" + } +} +``` + +#### Sample data + +```json +{ + "code": 200, + "result": true, + "message": "ok", + "data": [ + { + "status": "ABNORMAL", + "bk_biz_id": 2, + "is_ack": false, + "level": 1, + "origin_alarm": { + "data": { + "record_id": "d751713988987e9331980363e24189ce.1574439900", + "values": { + "count": 10, + "dtEventTimeStamp": 1574439900 + }, + "dimensions": {}, + "value": 10, + "time": 1574439900 + }, + "trigger": { + "level": "1", + "anomaly_ids": [ + "d751713988987e9331980363e24189ce.1574439660.88.118.1", + "d751713988987e9331980363e24189ce.1574439720.88.118.1", + "d751713988987e9331980363e24189ce.1574439780.88.118.1", + "d751713988987e9331980363e24189ce.1574439840.88.118.1", + "d751713988987e9331980363e24189ce.1574439900.88.118.1", + "d751713988987e9331980363e24189ce.1574439960.88.118.1", + "d751713988987e9331980363e24189ce.1574440020.88.118.1", + "d751713988987e9331980363e24189ce.1574440080.88.118.1", + "d751713988987e9331980363e24189ce.1574440140.88.118.1" + ] + }, + "anomaly": { + "1": { + "anomaly_message": "count >= 1.0, current value 10.0", + "anomaly_time": "2019-11-22 16:31:06", + "anomaly_id": "d751713988987e9331980363e24189ce.1574439900.88.118.1" + } + }, + "dimension_translation": {}, + "strategy_snapshot_key": "bk_bkmonitor.ee.cache.strategy.snapshot.88.1574411061" + }, + "target_key": "", + "strategy_id": 88, + "id": 1364253, + "is_shielded": false, + "event_id": "d751713988987e9331980363e24189ce.1574439660.88.118.1", + "create_time": "2019-11-22 16:31:07", + "end_time": null, + "begin_time": "2019-11-22 16:25:00", + "origin_config": {}, + "p_event_id": "" + } + ] +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_notice_group.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_notice_group.md new file mode 100644 index 000000000..590fdf24b --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/search_notice_group.md @@ -0,0 +1,97 @@ +### Function description + +Querying an Alarm Group + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| ---------- | ---- | ---- | -------- | +| bk_biz_ids | list | no | business IDs | +| ids | list | no | notification group ids | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "bk_biz_ids": [2], + "ids": [1] +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | + +#### Data field description + +| Field | Type | Description | +| --------------- | ------ | ------------------ | +| bk_biz_id | int | Business ID | +| name | string | name | +| message | string | Description | +| notice_way | dict | notification methods at each level | +| id | int | Alarm ID | +| notice_receiver | list | list of notifiers | +| webhook_url | string | Callback address | +| update_time | string | update time | +| update_user | string | updated by | +| create_time | string | Created by | + +#### notice_receiver - list of notifiers + +Notification objects have two types `user` or `group`. + +1. The notification object corresponding to user is the user name +2. group corresponds to the notification group +1. operator - the main person in charge +2. bk_bak_operator - backup manager +3. bk_biz_tester - test +4. bk_biz_productor - Product +5. bk_biz_maintainer --Luck +6. bk_biz_developer - Development + +#### Sample data + +```json +{ + "message": "OK", + "code": 200, + "data": [ + { + "bk_biz_id": 2, + "update_time": "2019-11-18 17:51:54+0800", + "notice_receiver": [ + { + "type": "user", + "id": "admin" + } + ], + "update_user": "admin", + "name": "layman", + "notice_way": { + "1": ["weixin"], + "2": ["weixin"], + "3": ["weixin"] + }, + "create_time": "2019-11-18 17:51:54+0800", + "message": "", + "webhook_url": "", + "id": 5 + } + ], + "result": true +} +``` + diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/switch_alarm_strategy.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/switch_alarm_strategy.md new file mode 100644 index 000000000..f60b31ab9 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/switch_alarm_strategy.md @@ -0,0 +1,59 @@ +### Function description + +switch alarm strategy + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| --------- | ---- | ---- | ---------- | +| ids | list | Yes | list of policy IDs | +| is_enabled | bool | yes | whether to enable | + +#### Parameters example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "ids": [80], + "is_enabled": true +} +``` + +### Response parameters + +| Field | Type | Description | +| ---------- | ------ | ------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | dict | data | +| request_id | string | Request ID | + +#### Data parameter description + +| Field | Type | Description | +| --------- | ------ | ---------- | +| ids | list | List of existing policy IDs | + +#### Parameters example + +```json +{ + "result": true, + "code": 200, + "data": { + "ids": [ + 80 + ] + }, + "message": "ok", + "request_id": "eafafwafw1212241212513wafafafw" +} +``` + diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/en/update_partial_strategy_v2.md b/paas2/esb/components/confapis/monitor_v3/apidocs/en/update_partial_strategy_v2.md new file mode 100644 index 000000000..4107b3e92 --- /dev/null +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/en/update_partial_strategy_v2.md @@ -0,0 +1,71 @@ +### Function description + +Batch update strategy local configuration + +### Request parameters + +{{ common_args_desc }} + +#### Interface parameters + +| Field | Type | Required | Description | +| -------- | ---- | ---- | -------------- | +| edit_data | dict | yes | data to be modified | +| ids | list | yes | list of policy IDs to be modified | +| bk_biz_id | int | yes | business id | + +#### edit_data + +| Field | Type | Required | Description | +| ------------------ | ------- | ---------- | ---------- | +| is_enabled | bool | no | enabled state | +| notice_group_list | list | No | Alarm group configuration | +| labels | list | no | policy labels | +| trigger_config | dict | no | trigger condition | +| recovery_config | dict | no | recovery conditions | +| alarm_interval | int | no | notification interval | +| send_recovery_alarm | bool | no | recovery notification | +| message_template | string | no | notification template | +| no_data_config | dict | no | no data config | +| target | list | no | monitoring target | + +#### Sample data + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxxxx", + "bk_token": "xxxx", + "ids": [ + 23121 + ], + "edit_data": { + "notice_group_list": [ + 4644 + ] + }, + "bk_biz_id": 883 +} +``` + +### Response parameters + +| Field | Type | Description | +| ------- | ------ | ------------------ | +| result | bool | Whether the request was successful | +| code | int | Returned status code | +| message | string | Description | +| data | list | Successfully updated policy id table | + +#### Sample data + +```json +{ + "result": true, + "code": 200, + "message": "OK", + "data": [ + 23121 + ] +} +``` diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/add_shield.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/add_shield.md index 250d0c446..93d0dbfd9 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/add_shield.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/add_shield.md @@ -28,7 +28,7 @@ | end_time | string | 否 | 结束时间(每天) | | type | int | 是 | 屏蔽周期类型(单次:1,每天:2,每周:3,每月:4) | | day_list | list | 否 | 周期为月时,需要屏蔽的天 | -| week_list | list | 否 | 周期为星期是,需要屏蔽的天 | +| week_list | list | 否 | 周期为星期时,需要屏蔽的天 | #### 通知配置(notice_config) diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/get_ts_data.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/get_ts_data.md index 5fc76c51e..9d386d4bf 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/get_ts_data.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/get_ts_data.md @@ -31,16 +31,19 @@ >sql中的结果表名为biz_id + db_name + table_name > ->Biz_id:业务id ->Db_name: 数据库名 ->Table_name: 数据表名 ->例:2_system_cpu_detail:业务2下的system库的cpu_detail表 ->查询一个小时内的单核cpu的使用率的sql语句: ->Select Mean(usage) as usage from 2_system_detail where time > '1h' group by ip,device_name,minute1 limit 10 +>- Biz_id:业务id +> +>- Db_name: 数据库名 +> +>- Table_name: 数据表名 +> +> 例:2_system_cpu_detail:业务2下的system库的cpu_detail表 ,查询一个小时内的单核cpu的使用率的sql语句: +> +> Select Mean(usage) as usage from 2_system_detail where time > '1h' group by ip,device_name,minute1 limit 10 >上面请求实例中结果表3_system_disk表示:业务3下的system库中的disk表 ->注意:上述的库和表并非和时序存储中的实际物理库、表对应。而是指'源数据管理模块'的库表 +>注意:上述的库和表并非和时序存储中的实际物理库、表对应。而是指`源数据管理模块`的库表 ### 返回结果 diff --git a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/import_uptime_check_task.md b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/import_uptime_check_task.md index 1a2a481ec..4f56c2ef1 100644 --- a/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/import_uptime_check_task.md +++ b/paas2/esb/components/confapis/monitor_v3/apidocs/zh_hans/import_uptime_check_task.md @@ -114,7 +114,7 @@ ###### 拨测任务详细配置(HTTP)--conf_list.collector_conf.config -| 字段 | 类型 | 描述 | +| 字段 | 类型 | 必选 | | -------------------- | ---- | ---- | | urls | str | 是 | | method | str | 是 | @@ -125,7 +125,6 @@ | timeout | int | 否 | | response | str | 否 | | response_code | str | 否 | -| request | str | 否 | ##### 监控策略配置--conf_list.monitor_conf 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 index 5a497a538..7451add97 100644 --- 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 @@ -73,7 +73,7 @@ | create_time | string | 创建时间 | | last_modify_user | string | 最后更新人 | | last_modify_time | string | 最后更新时间 | -| metric_info_list | list | \自定义时序列表 | +| metric_info_list | list | 自定义时序列表 | #### data.metric_info_list具体内容说明 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 ebd0fe78e..d22621ed2 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 @@ -285,9 +285,9 @@ host_set_template #### data字段说明 -| 字段 | 类型 | 必选 | 描述 | -| ----------- | ---- | ---- | ------ | -| strategy_id | int | 是 | 策略ID | +| 字段 | 类型 | 描述 | +| ----------- | ---- | ------ | +| strategy_id | int | 策略ID | #### 示例数据 diff --git a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml index bc8cfb1dd..bb5ba236d 100644 --- a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml +++ b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml @@ -4,7 +4,7 @@ dest_path: /api/v3/collector/uptime_check_node/import/ is_hidden: false label: 导入拨测节点配置 - label_en: null + label_en: import uptime check node name: import_uptime_check_node path: /v2/monitor_v3/import_uptime_check_node/ suggest_method: POST @@ -14,7 +14,7 @@ dest_path: /api/v3/collector/uptime_check_task/export/ is_hidden: false label: 导出拨测任务配置 - label_en: null + label_en: export uptime check task name: export_uptime_check_task path: /v2/monitor_v3/export_uptime_check_task/ suggest_method: GET @@ -24,7 +24,7 @@ dest_path: /api/v3/collector/uptime_check_task/import/ is_hidden: false label: 导入拨测任务配置 - label_en: null + label_en: import uptime check task name: import_uptime_check_task path: /v2/monitor_v3/import_uptime_check_task/ suggest_method: POST @@ -34,7 +34,7 @@ dest_path: /api/v3/query/get_ts_data/ is_hidden: false label: 获取时序数据 - label_en: null + label_en: get ts data name: get_ts_data path: /v2/monitor_v3/get_ts_data/ suggest_method: POST @@ -44,7 +44,7 @@ dest_path: /api/v3/query/get_es_data/ is_hidden: true label: 获取监控链路时序数据 - label_en: null + label_en: get es data name: get_es_data path: /v2/monitor_v3/get_es_data/ suggest_method: POST @@ -54,7 +54,7 @@ dest_path: /api/v3/meta/create_data_id/ is_hidden: false label: 创建监控数据源 - label_en: null + label_en: metadata create data id name: metadata_create_data_id path: /v2/monitor_v3/metadata_create_data_id/ method: POST @@ -64,7 +64,7 @@ dest_path: /api/v3/meta/result_table/ is_hidden: false label: 创建监控结果表 - label_en: null + label_en: metadata create result table name: metadata_create_result_table path: /v2/monitor_v3/metadata_create_result_table/ method: POST @@ -74,7 +74,7 @@ dest_path: /api/v3/meta/result_table/ is_hidden: false label: 查询监控结果表 - label_en: null + label_en: metadata list result table name: metadata_list_result_table path: /v2/monitor_v3/metadata_list_result_table/ method: GET @@ -84,7 +84,7 @@ dest_path: /api/v3/meta/modify_result_table/ is_hidden: false label: 修改监控结果表 - label_en: null + label_en: metadata modify result table name: metadata_modify_result_table path: /v2/monitor_v3/metadata_modify_result_table/ method: POST @@ -94,7 +94,7 @@ dest_path: /api/v3/meta/get_data_id/ is_hidden: false label: 获取监控数据源具体信息 - label_en: null + label_en: metadata get data id name: metadata_get_data_id path: /v2/monitor_v3/metadata_get_data_id/ method: GET @@ -104,7 +104,7 @@ dest_path: /api/v3/meta/get_result_table/ is_hidden: false label: 获取监控结果表具体信息 - label_en: null + label_en: metadata get result table name: metadata_get_result_table path: /v2/monitor_v3/metadata_get_result_table/ method: GET @@ -114,7 +114,7 @@ dest_path: /api/v3/meta/upgrade_result_table/ is_hidden: false label: 将指定的监控单业务结果表升级为全业务结果表 - label_en: null + label_en: metadata upgrade result table name: metadata_upgrade_result_table path: /v2/monitor_v3/metadata_upgrade_result_table/ method: POST @@ -124,7 +124,7 @@ dest_path: /api/v3/meta/modify_data_id/ is_hidden: false label: 修改指定数据源的配置信息 - label_en: null + label_en: metadata modify data id name: metadata_modify_data_id path: /v2/monitor_v3/metadata_modify_data_id/ method: POST @@ -134,7 +134,7 @@ dest_path: /api/v3/meta/create_result_table_metric_split/ is_hidden: false label: 创建结果表的维度拆分配置 - label_en: null + label_en: metadata create result table metric split name: metadata_create_result_table_metric_split path: /v2/monitor_v3/metadata_create_result_table_metric_split/ method: POST @@ -144,7 +144,7 @@ dest_path: /api/v3/meta/label/ is_hidden: false label: 查询当前已有的标签信息 - label_en: null + label_en: metadata list label name: metadata_list_label path: /v2/monitor_v3/metadata_list_label/ method: GET @@ -154,7 +154,7 @@ dest_path: /api/v3/meta/get_result_table_storage/ is_hidden: false label: 查询指定结果表的指定存储信息 - label_en: null + label_en: metadata get result table storage name: metadata_get_result_table_storage path: /v2/monitor_v3/metadata_get_result_table_storage/ method: GET @@ -165,7 +165,7 @@ dest_path: /api/v3/meta/get_cluster_info/ is_hidden: true label: 查询指定存储集群信息 - label_en: null + label_en: metadata get cluster info name: metadata_get_cluster_info path: /v2/monitor_v3/metadata_get_cluster_info/ method: GET @@ -176,7 +176,7 @@ dest_path: /api/v3/meta/create_cluster_info/ is_hidden: false label: 创建存储集群信息 - label_en: null + label_en: metadata create cluster info name: metadata_create_cluster_info path: /v2/monitor_v3/metadata_create_cluster_info/ method: POST @@ -187,7 +187,7 @@ dest_path: /api/v3/meta/modify_cluster_info/ is_hidden: false label: 修改存储集群信息 - label_en: null + label_en: metadata modify cluster info name: metadata_modify_cluster_info path: /v2/monitor_v3/metadata_modify_cluster_info/ method: POST @@ -198,7 +198,7 @@ dest_path: /api/v3/meta/get_event_group/ is_hidden: false label: 查询事件分组具体内容 - label_en: null + label_en: metadata get event group name: metadata_get_event_group path: /v2/monitor_v3/metadata_get_event_group/ method: GET @@ -209,7 +209,7 @@ dest_path: /api/v3/meta/delete_event_group/ is_hidden: false label: 删除事件分组 - label_en: null + label_en: metadata delete event group name: metadata_delete_event_group path: /v2/monitor_v3/metadata_delete_event_group/ method: POST @@ -220,7 +220,7 @@ dest_path: /api/v3/meta/modify_event_group/ is_hidden: false label: 修改事件分组 - label_en: null + label_en: metadata modify event group name: metadata_modify_event_group path: /v2/monitor_v3/metadata_modify_event_group/ method: POST @@ -231,7 +231,7 @@ dest_path: /api/v3/meta/create_event_group/ is_hidden: false label: 创建事件分组 - label_en: null + label_en: metadata create event group name: metadata_create_event_group path: /v2/monitor_v3/metadata_create_event_group/ method: POST @@ -242,7 +242,7 @@ dest_path: /api/v3/meta/query_event_group/ is_hidden: false label: 查询事件分组 - label_en: null + label_en: metadata query event group name: metadata_query_event_group path: /v2/monitor_v3/metadata_query_event_group/ method: GET @@ -253,7 +253,7 @@ dest_path: /api/v3/models/uptime_check_task/ is_hidden: true label: 拨测任务列表 - label_en: null + label_en: get uptime check task list name: get_uptime_check_task_list path: /v2/monitor_v3/get_uptime_check_task_list/ suggest_method: GET @@ -263,7 +263,7 @@ dest_path: /api/v3/models/uptime_check_node/ is_hidden: true label: 拨测节点列表 - label_en: null + label_en: get uptime check node list name: get_uptime_check_node_list path: /v2/monitor_v3/get_uptime_check_node_list/ suggest_method: GET @@ -274,7 +274,7 @@ dest_path: /api/v3/models/uptime_check_node/{node_id}/ is_hidden: true label: 获取拨测节点信息 - label_en: uptime_check_node_info + label_en: uptime check node info name: uptime_check_node_info path: /v2/monitor_v3/uptime_check_node_info/ suggest_method: GET @@ -284,7 +284,7 @@ dest_path: /api/v3/models/uptime_check_node/edit/ is_hidden: true label: 编辑拨测节点信息 - label_en: edit_uptime_check_node + label_en: edit uptime check node info name: edit_uptime_check_node path: /v2/monitor_v3/edit_uptime_check_node/ suggest_method: POST @@ -294,7 +294,7 @@ dest_path: /api/v3/models/uptime_check_node/delete/ is_hidden: true label: 删除拨测节点 - label_en: delete_uptime_check_node + label_en: delete uptime check node name: delete_uptime_check_node path: /v2/monitor_v3/delete_uptime_check_node/ suggest_method: POST @@ -305,7 +305,7 @@ dest_path: /api/v3/models/uptime_check_node/add/ is_hidden: true label: 创建拨测节点 - label_en: create_uptime_check_node + label_en: create uptime check node name: create_uptime_check_node path: /v2/monitor_v3/create_uptime_check_node/ suggest_method: POST @@ -316,7 +316,7 @@ dest_path: /api/v3/models/uptime_check_task/{task_id}/ is_hidden: true label: 获取拨测任务信息 - label_en: uptime_check_task_info + label_en: uptime check task info name: uptime_check_task_info path: /v2/monitor_v3/uptime_check_task_info/ suggest_method: GET @@ -327,7 +327,7 @@ dest_path: /api/v3/models/uptime_check_task/add/ is_hidden: true label: 创建拨测任务 - label_en: create_uptime_check_task + label_en: create uptime check task name: create_uptime_check_task path: /v2/monitor_v3/create_uptime_check_task/ suggest_method: POST @@ -338,7 +338,7 @@ dest_path: /api/v3/models/uptime_check_task/edit/ is_hidden: true label: 编辑拨测任务信息 - label_en: edit_uptime_check_task + label_en: edit uptime check task info name: edit_uptime_check_task path: /v2/monitor_v3/edit_uptime_check_task/ suggest_method: POST @@ -348,7 +348,7 @@ dest_path: /api/v3/models/uptime_check_task/delete/ is_hidden: true label: 删除拨测任务 - label_en: delete_uptime_check_task + label_en: delete uptime check task name: delete_uptime_check_task path: /v2/monitor_v3/delete_uptime_check_task/ suggest_method: POST @@ -358,7 +358,7 @@ dest_path: /api/v3/models/uptime_check_task/test/ is_hidden: true label: 测试连通性 - label_en: test_uptime_check_task + label_en: test uptime check task name: test_uptime_check_task path: /v2/monitor_v3/test_uptime_check_task/ suggest_method: POST @@ -368,7 +368,7 @@ dest_path: /api/v3/models/uptime_check_task/deploy/ is_hidden: true label: 下发拨测任务 - label_en: deploy_uptime_check_task + label_en: deploy uptime check task name: deploy_uptime_check_task path: /v2/monitor_v3/deploy_uptime_check_task/ suggest_method: POST @@ -379,7 +379,7 @@ dest_path: /api/v3/models/uptime_check_task/change_status/ is_hidden: true label: 启停拨测任务 - label_en: change_uptime_check_task_status + 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 @@ -390,7 +390,7 @@ dest_path: /api/v3/models/collect_config/ is_hidden: true label: 采集配置列表 - label_en: null + label_en: get collect config list name: get_collect_config_list path: /v2/monitor_v3/get_collect_config_list/ suggest_method: GET @@ -563,7 +563,7 @@ dest_path: /api/v3/meta/modify_time_series_group/ is_hidden: false label: 修改自定义时序分组 - label_en: null + label_en: modify time series group name: metadata_modify_time_series_group path: /v2/monitor_v3/metadata_modify_time_series_group/ method: POST @@ -574,7 +574,7 @@ dest_path: /api/v3/meta/delete_time_series_group/ is_hidden: false label: 删除自定义时序分组 - label_en: null + label_en: delete time series group name: metadata_delete_time_series_group path: /v2/monitor_v3/metadata_delete_time_series_group/ method: POST @@ -596,7 +596,7 @@ dest_path: /api/v3/meta/get_time_series_group/ is_hidden: false label: 获取自定义时序分组具体内容 - label_en: null + label_en: get time series group name: metadata_get_time_series_group path: /v2/monitor_v3/metadata_get_time_series_group/ method: GET @@ -607,7 +607,7 @@ dest_path: /api/v3/meta/query_time_series_group/ is_hidden: false label: 查询事件分组 - label_en: null + label_en: query time series group name: metadata_query_time_series_group path: /v2/monitor_v3/metadata_query_time_series_group/ method: GET @@ -651,7 +651,7 @@ dest_path: /api/v3/meta/query_tag_values/ is_hidden: false label: 获取自定义时序分组具体内容 - label_en: null + label_en: get time series group values name: metadata_query_tag_values path: /v2/monitor_v3/metadata_query_tag_values/ method: GET @@ -904,7 +904,7 @@ dest_path: /api/v3/meta/list_transfer_cluster/ is_hidden: false label: 获取所有transfer集群信息 - label_en: null + label_en: list transfer cluster name: metadata_list_transfer_cluster path: /v2/monitor_v3/metadata_list_transfer_cluster/ method: GET @@ -937,7 +937,7 @@ dest_path: /api/v4/mail_report/get_statistics_by_json/ is_hidden: true label: 查询运营数据 - label_en: null + label_en: get statistics by json name: get_statistics_by_json path: /v2/monitor_v3/get_statistics_by_json/ method: GET @@ -948,7 +948,7 @@ dest_path: /api/v4/mail_report/test_report_mail/ is_hidden: true label: 订阅报表测试 - label_en: null + label_en: test report mail name: test_report_mail path: /v2/monitor_v3/test_report_mail/ method: POST @@ -959,7 +959,7 @@ dest_path: /api/v4/mail_report/group_list/ is_hidden: true label: 查询组内人员 - label_en: null + label_en: group list name: group_list path: /v2/monitor_v3/group_list/ method: GET @@ -970,7 +970,7 @@ dest_path: /api/v4/mail_report/is_superuser/ is_hidden: true label: 判断用户是否超级管理员 - label_en: null + label_en: is superuser name: is_superuser path: /v2/monitor_v3/is_superuser/ method: GET @@ -981,7 +981,7 @@ dest_path: /api/v4/mail_report/get_setting_and_notify_group/ is_hidden: true label: 获取配置管理员及其业务、告警接收人及其业务 - label_en: null + label_en: get setting and notify group name: get_setting_and_notify_group path: /v2/monitor_v3/get_setting_and_notify_group/ method: GET @@ -1020,6 +1020,17 @@ 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 @@ -1075,13 +1086,68 @@ path: /v2/monitor_v3/update_partial_strategy_v2/ 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_v3/search/ + is_hidden: false + label: 查询告警策略 + label_en: search alarm strategy + name: search_alarm_strategy_v3 + path: /v2/monitor_v3/search_alarm_strategy_v3/ + 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_v3/save/ + is_hidden: false + label: 保存告警策略 + label_en: save alarm strategy + name: save_alarm_strategy_v3 + path: /v2/monitor_v3/save_alarm_strategy_v3/ + 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_v3/delete/ + is_hidden: false + label: 删除告警策略 + label_en: delete alarm strategy + name: delete_alarm_strategy_v3 + path: /v2/monitor_v3/delete_alarm_strategy_v3/ + 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_v3/update_bulk/ + is_hidden: false + label: 批量更新策略局部配置 + label_en: update partial strategy + name: update_partial_strategy_v3 + path: /v2/monitor_v3/update_partial_strategy_v3/ + 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_v3/search_without_biz/ + is_hidden: false + label: 查询全业务告警策略 + label_en: search alarm strategy without biz + name: search_alarm_strategy_without_biz + path: /v2/monitor_v3/search_alarm_strategy_without_biz/ + suggest_method: POST + - api_type: operate comp_codename: generic.v2.monitor_v3.monitor_v3_component dest_http_method: POST dest_path: /api/v3/meta/create_es_snapshot_repository/ is_hidden: true label: 创建ES快照仓库 - label_en: null + label_en: create es snapshot repository name: metadata_create_es_snapshot_repository path: /v2/monitor_v3/metadata_create_es_snapshot_repository/ method: POST @@ -1092,7 +1158,7 @@ dest_path: /api/v3/meta/modify_es_snapshot_repository/ is_hidden: true label: 修改ES快照仓库 - label_en: null + label_en: modify es snapshot repository name: metadata_modify_es_snapshot_repository path: /v2/monitor_v3/metadata_modify_es_snapshot_repository/ method: POST @@ -1103,7 +1169,7 @@ dest_path: /api/v3/meta/delete_es_snapshot_repository/ is_hidden: true label: 删除ES快照仓库 - label_en: null + label_en: delete es snapshot repository name: metadata_delete_es_snapshot_repository path: /v2/monitor_v3/metadata_delete_es_snapshot_repository/ method: POST @@ -1114,7 +1180,7 @@ dest_path: /api/v3/meta/verify_es_snapshot_repository/ is_hidden: true label: 验证ES快照仓库 - label_en: null + label_en: verify es snapshot repository name: metadata_verify_es_snapshot_repository path: /v2/monitor_v3/metadata_verify_es_snapshot_repository/ method: GET @@ -1125,7 +1191,7 @@ dest_path: /api/v3/meta/es_snapshot_repository/ is_hidden: true label: 查询指定ES快照仓库 - label_en: null + label_en: query es snapshot repository name: es_snapshot_repository path: /v2/monitor_v3/metadata_es_snapshot_repository/ method: GET @@ -1136,7 +1202,7 @@ dest_path: /api/v3/meta/list_es_snapshot_repository/ is_hidden: true label: 快照仓库列表 - label_en: null + label_en: list es snapshot repository name: list_es_snapshot_repository path: /v2/monitor_v3/metadata_list_es_snapshot_repository/ method: POST @@ -1147,7 +1213,7 @@ dest_path: /api/v3/meta/create_result_table_snapshot/ is_hidden: true label: 创建结果表快照配置 - label_en: null + label_en: create result table snapshot name: create_result_table_snapshot path: /v2/monitor_v3/metadata_create_result_table_snapshot/ method: POST @@ -1158,7 +1224,7 @@ dest_path: /api/v3/meta/modify_result_table_snapshot/ is_hidden: true label: 修改结果表快照配置 - label_en: null + label_en: modify result table snapshot name: modify_result_table_snapshot path: /v2/monitor_v3/metadata_modify_result_table_snapshot/ method: POST @@ -1169,7 +1235,7 @@ dest_path: /api/v3/meta/delete_result_table_snapshot/ is_hidden: true label: 删除结果表快照配置 - label_en: null + label_en: delete result table snapshot name: delete_result_table_snapshot path: /v2/monitor_v3/metadata_delete_result_table_snapshot/ method: POST @@ -1180,7 +1246,7 @@ dest_path: /api/v3/meta/list_result_table_snapshot/ is_hidden: true label: 结果表快照配置列表 - label_en: null + label_en: list result table snapshot name: list_result_table_snapshot path: /v2/monitor_v3/metadata_list_result_table_snapshot/ method: POST @@ -1191,7 +1257,7 @@ dest_path: /api/v3/meta/list_result_table_snapshot_indices/ is_hidden: true label: 结果表快照配置列表含物理索引 - label_en: null + label_en: list result table snapshot indices name: list_result_table_snapshot_indices path: /v2/monitor_v3/metadata_list_result_table_snapshot_indices/ method: POST @@ -1202,7 +1268,7 @@ dest_path: /api/v3/meta/get_result_table_snapshot_state/ is_hidden: true label: 验证ES快照仓库 - label_en: null + label_en: verify es snapshot repository name: get_result_table_snapshot_state path: /v2/monitor_v3/metadata_get_result_table_snapshot_state/ method: POST @@ -1213,7 +1279,7 @@ dest_path: /api/v3/meta/restore_result_table_snapshot/ is_hidden: true label: 快照回溯 - label_en: null + label_en: restore result table snapshot name: restore_result_table_snapshot path: /v2/monitor_v3/metadata_restore_result_table_snapshot/ method: POST @@ -1224,7 +1290,7 @@ dest_path: /api/v3/meta/modify_restore_result_table_snapshot/ is_hidden: true label: 修改快照回溯配置 - label_en: null + label_en: modify restore result table snapshot name: modify_restore_result_table_snapshot path: /v2/monitor_v3/metadata_modify_restore_result_table_snapshot/ method: POST @@ -1235,7 +1301,7 @@ dest_path: /api/v3/meta/delete_restore_result_table_snapshot/ is_hidden: true label: 删除快照回溯配置 - label_en: null + label_en: delete restore result table snapshot name: delete_restore_result_table_snapshot path: /v2/monitor_v3/metadata_delete_restore_result_table_snapshot/ method: POST @@ -1246,7 +1312,7 @@ dest_path: /api/v3/meta/list_restore_result_table_snapshot/ is_hidden: true label: 快照回溯列表 - label_en: null + label_en: list restore result table snapshot name: list_restore_result_table_snapshot path: /v2/monitor_v3/metadata_list_restore_result_table_snapshot/ method: POST @@ -1257,23 +1323,11 @@ dest_path: /api/v3/meta/get_restore_result_table_snapshot_state/ is_hidden: true label: 快照回溯状态 - label_en: null + label_en: restore result table snapshot state name: get_restore_result_table_snapshot_state path: /v2/monitor_v3/metadata_get_restore_result_table_snapshot_state/ method: POST - -- 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 @@ -1357,7 +1411,7 @@ dest_path: /api/v3/meta/delete_cluster_info/ is_hidden: true label: 删除存储集群信息 - label_en: null + label_en: delete cluster info name: metadata_delete_cluster_info path: /v2/monitor_v3/metadata_delete_cluster_info/ method: POST @@ -1368,10 +1422,340 @@ dest_path: /api/v4/alert_info/search_alert_by_event/ is_hidden: true label: 根据event获取告警处理信息 - label_en: null + label_en: search alert by event name: search_alert_by_event path: /v2/monitor_v3/search_alert_by_event/ method: POST +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/action_config/save/ + is_hidden: flase + label: 保存处理套餐 + label_en: save_action_config + name: save_action_config + path: /v2/monitor_v3/save_action_config/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/action_config/detail/ + is_hidden: flase + label: 获取单个处理套餐 + label_en: get_action_config + name: get_action_config + path: /v2/monitor_v3/get_action_config/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v4/action_config/search/ + is_hidden: flase + label: 批量获取处理套餐 + label_en: search_action_config + name: search_action_config + path: /v2/monitor_v3/search_action_config/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/action_config/edit/ + is_hidden: flase + label: 编辑处理套餐 + label_en: edit_action_config + name: edit_action_config + path: /v2/monitor_v3/edit_action_config/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/action_config/delete/ + is_hidden: flase + label: 删除处理套餐 + label_en: delete_action_config + name: delete_action_config + path: /v2/monitor_v3/delete_action_config/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/search_action/search_action/ + is_hidden: flase + label: 查询处理记录 + label_en: search_action + name: search_action + path: /v2/monitor_v3/search_action/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/search_alert/search_alert/ + is_hidden: flase + label: 查询告警记录 + label_en: search_alert + name: search_alert + path: /v2/monitor_v3/search_alert/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/create_application/ + is_hidden: true + label: 创建APM应用 + label_en: null + name: create_apm_application + path: /v2/monitor_v3/create_apm_application/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/apply_datasource/ + is_hidden: true + label: 申请APM数据源 + label_en: null + name: apply_apm_datasource + path: /v2/monitor_v3/apply_apm_datasource/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/list_application/ + is_hidden: true + label: 获取应用列表 + label_en: list apm application + name: list_apm_application + path: /v2/monitor_v3/list_apm_application/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/detail_application/ + is_hidden: true + label: 应用详情 + label_en: detail apm application + name: detail_apm_application + path: /v2/monitor_v3/detail_apm_application/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/meta_info/list_es_cluster_info/ + is_hidden: true + label: 获取es集群信息 + label_en: list apm es cluster info + name: list_apm_es_cluster_info + path: /v2/monitor_v3/list_apm_es_cluster_info/ + method: GET +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/topo/query_topo_instance/ + is_hidden: true + label: 查询topo实例 + label_en: query apm topo instance + name: query_apm_topo_instance + path: /v2/monitor_v3/query_apm_topo_instance/ + method: POST +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/topo/query_topo_node/ + is_hidden: true + label: 查询topo节点 + label_en: query apm topo node + name: query_apm_topo_node + path: /v2/monitor_v3/query_apm_topo_node/ + method: GET +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + 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 +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/query_root_endpoint/ + is_hidden: true + label: 查询root入口 + label_en: query apm root endpoint + name: query_apm_root_endpoint + path: /v2/monitor_v3/query_apm_root_endpoint/ + method: GET +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/start_application/ + is_hidden: true + label: 启动应用 + label_en: start apm application + name: start_apm_application + path: /v2/monitor_v3/start_apm_application/ + method: GET +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/stop_application/ + is_hidden: true + label: 停止应用 + label_en: stop apm application + name: stop_apm_application + path: /v2/monitor_v3/stop_apm_application/ + method: GET +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/query_event/ + is_hidden: true + label: 查询APM相关事件信息 + label_en: query apm event + name: query_apm_event + path: /v2/monitor_v3/query_apm_event/ + 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/ + is_hidden: true + label: 查询span信息 + label_en: query apm span + name: query_apm_span + path: /v2/monitor_v3/query_apm_span/ + 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_endpoint/ + is_hidden: true + label: 查询APM入口 + label_en: query apm endpoint + name: query_apm_endpoint + path: /v2/monitor_v3/query_apm_endpoint/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/query_fields/ + is_hidden: true + label: 查询字段信息 + label_en: query apm fields + name: query_apm_fields + path: /v2/monitor_v3/query_apm_fields/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/update_metric_fields/ + is_hidden: true + label: 更新apm指标字段 + label_en: update apm metric fields + name: update_apm_metric_fields + path: /v2/monitor_v3/update_apm_metric_fields/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v3/meta/es_route/ + is_hidden: true + label: 转发 es get 请求 + label_en: es route request + name: metadata_es_route + path: /v2/monitor_v3/metadata_es_route/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /api/v3/meta/kafka_tail/ + is_hidden: true + label: 查询结果表MQ的最新数据 + label_en: query result_table kafka tail data + name: metadata_kafka_tail + path: /v2/monitor_v3/metadata_kafka_tail/ + method: GET + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/query_es/ + is_hidden: true + label: 查询apm相关es数据 + label_en: query apm es + name: query_apm_es + path: /v2/monitor_v3/query_apm_es/ + 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_trace_list/ + is_hidden: true + label: 查询trace列表 + label_en: query apm trace list + name: query_apm_trace_list + path: /v2/monitor_v3/query_apm_trace_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_trace_detail/ + is_hidden: true + label: 查询trace详情 + label_en: query trace detail + name: query_apm_trace_detail + path: /v2/monitor_v3/query_apm_trace_detail/ + method: POST + +- api_type: query + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: GET + dest_path: /apm_api/v1/application/application_config/ + is_hidden: true + label: 查询APM应用配置 + label_en: query apm application config + name: query_apm_application_config + path: /v2/monitor_v3/query_apm_application_config/ + method: GET + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/release_app_config/ + is_hidden: true + label: 下发APM应用配置 + label_en: release apm app config + name: release_apm_app_config + path: /v2/monitor_v3/release_apm_app_config/ + method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /apm_api/v1/application/delete_app_config/ + is_hidden: true + label: 删除APM应用配置 + label_en: delete apm app config + name: delete_apm_app_config + path: /v2/monitor_v3/delete_apm_delete_app_config/ - api_type: operate comp_codename: generic.v2.monitor_v3.monitor_v3_component @@ -1382,4 +1766,4 @@ label_en: null name: get_action_params_by_config path: /v2/monitor_v3/get_action_params_by_config/ - method: POST \ No newline at end of file + method: POST From dfb8e76c17712c36bb44526f62e2e00ba9cd11be Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Fri, 27 May 2022 11:01:35 +0800 Subject: [PATCH 2/3] 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 ae8496e77..3f1be7571 100644 --- a/paas2/VERSION +++ b/paas2/VERSION @@ -1 +1 @@ -2.14.11 +2.14.12 diff --git a/paas2/release.md b/paas2/release.md index 194d7b2d1..89d786c14 100644 --- a/paas2/release.md +++ b/paas2/release.md @@ -1,5 +1,8 @@ Release Log =============================== +# 2.14.12 + - update: esb update monitor_v3 confapis + # 2.14.11 - bugfix: login bg.png resolution From 06f33c2b43e3ed1afd476844c92b48492ae6d811 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Fri, 27 May 2022 11:05:22 +0800 Subject: [PATCH 3/3] update monitor_v3 --- .../confapis/monitor_v3/monitor_v3.yaml | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml index bb5ba236d..ff049cb55 100644 --- a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml +++ b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml @@ -1020,17 +1020,6 @@ 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 @@ -1328,6 +1317,18 @@ path: /v2/monitor_v3/metadata_get_restore_result_table_snapshot_state/ method: POST + +- 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