From d1dced367c8e515140d897ff8e6b6a8b830dfacf Mon Sep 17 00:00:00 2001 From: durant <826035498@qq.com> Date: Tue, 26 Nov 2024 15:33:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(backend):=20mongodb=20=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E9=87=87=E9=9B=86=20#8191?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/db_monitor/format.py | 4 + dbm-ui/backend/db_monitor/utils.py | 2 + .../json_files/bklog/mongo_backup_result.json | 1084 +++++++++++++++++ dbm-ui/backend/env/bklog.py | 1 + 4 files changed, 1091 insertions(+) create mode 100644 dbm-ui/backend/dbm_init/json_files/bklog/mongo_backup_result.json diff --git a/dbm-ui/backend/db_monitor/format.py b/dbm-ui/backend/db_monitor/format.py index a76cb053ff..a0cd11a5c2 100644 --- a/dbm-ui/backend/db_monitor/format.py +++ b/dbm-ui/backend/db_monitor/format.py @@ -122,6 +122,10 @@ def format_redis(cls): def format_mssql(cls): return cls.get_db_set_ctx(DBType.Sqlserver.value) + @classmethod + def format_mongodb(cls): + return cls.get_db_set_ctx(DBType.MongoDB.value) + @classmethod def custom_modify_mysql_slowlog(cls, params): """ diff --git a/dbm-ui/backend/db_monitor/utils.py b/dbm-ui/backend/db_monitor/utils.py index 39398ad465..344aa33de0 100644 --- a/dbm-ui/backend/db_monitor/utils.py +++ b/dbm-ui/backend/db_monitor/utils.py @@ -159,6 +159,8 @@ def create_bklog_collector(startswith: str = ""): bklog_params = JsonConfigFormat.format(bklog_params, JsonConfigFormat.format_redis.__name__) elif "mssql" in filename: bklog_params = JsonConfigFormat.format(bklog_params, JsonConfigFormat.format_mssql.__name__) + elif "mongodb" in filename: + bklog_params = JsonConfigFormat.format(bklog_params, JsonConfigFormat.format_mongodb.__name__) else: logger.warning(_("格式化函数{log_name}不存在(如果无需格式化json可忽略)").format(log_name=log_name)) diff --git a/dbm-ui/backend/dbm_init/json_files/bklog/mongo_backup_result.json b/dbm-ui/backend/dbm_init/json_files/bklog/mongo_backup_result.json new file mode 100644 index 0000000000..72aa72c144 --- /dev/null +++ b/dbm-ui/backend/dbm_init/json_files/bklog/mongo_backup_result.json @@ -0,0 +1,1084 @@ +{ + "bk_biz_id": null, + "etl_config": "bk_log_json", + "table_id": "mongo_backup_result", + "collector_config_name": "redis_fullbackup_result", + "collector_config_name_en": "redis_fullbackup_result", + "collector_scenario_id": "row", + "category_id": "host_process", + "data_encoding": "UTF-8", + "retention": 7, + "es_shards": 3, + "target_object_type": "HOST", + "target_node_type": "TOPO", + "target_nodes": [], + "params": { + "paths": [ + "/home/mysql/dbareport/mongo/backup/backup*.log" + ], + "conditions": { + "separator": "", + "separator_filters": [], + "type": "match", + "match_type": "include", + "match_content": "" + }, + "encoding": "UTF-8" + }, + "etl_params": { + "es_unique_field_list": [ + "cloudId", + "serverIp", + "path", + "gseIndex", + "iterationIndex", + "bk_host_id" + ], + "separator_node_source": "data", + "separator_node_action": "json", + "separator_node_name": "bk_separator_object", + "retain_original_text": true, + "separator_fields_remove": "", + "etl_flat": false + }, + "fields": [ + { + "field_name": "ext", + "type": "object", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "额外信息字段", + "unit": "", + "alias_name": "__ext", + "option": { + "es_type": "object" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "object", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "__parse_failure", + "type": "boolean", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "清洗失败标记", + "unit": "", + "alias_name": "", + "option": { + "real_path": "bk_separator_object.__parse_failure", + "es_type": "boolean" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "bk_host_id", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "主机ID", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "cloudid", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "云区域ID", + "unit": "", + "alias_name": "cloudId", + "option": { + "es_type": "integer" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "utctime", + "type": "timestamp", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "数据时间", + "unit": "", + "alias_name": "dtEventTimeStamp", + "option": { + "es_format": "epoch_millis", + "es_type": "date", + "time_format": "yyyy-MM-dd HH:mm:ss", + "time_zone": 0 + }, + "is_disabled": false, + "is_built_in": true, + "is_time": true, + "is_dimension": true, + "field_type": "string", + "is_analyzed": false, + "is_delete": false + }, + { + "field_name": "gseindex", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "gse索引", + "unit": "", + "alias_name": "gseIndex", + "option": { + "es_type": "long" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "long", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "iterationindex", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "迭代ID", + "unit": "", + "alias_name": "iterationIndex", + "option": { + "es_type": "integer" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "data", + "type": "string", + "tag": "metric", + "default_value": null, + "is_config_by_user": true, + "description": "original_text", + "unit": "", + "alias_name": "log", + "option": { + "es_norms": false, + "es_type": "text" + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": true, + "is_time": false, + "field_type": "string", + "is_analyzed": true, + "is_dimension": false, + "is_delete": false + }, + { + "field_name": "filename", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "日志路径", + "unit": "", + "alias_name": "path", + "option": { + "es_type": "keyword" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "ip", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "ip", + "unit": "", + "alias_name": "serverIp", + "option": { + "es_type": "keyword" + }, + "is_disabled": false, + "is_built_in": true, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "utctime", + "type": "timestamp", + "tag": "timestamp", + "default_value": "", + "is_config_by_user": true, + "description": "数据上报时间", + "unit": "", + "alias_name": "time", + "option": { + "es_format": "epoch_millis", + "es_type": "date", + "time_format": "yyyy-MM-dd HH:mm:ss", + "time_zone": 0 + }, + "is_disabled": false, + "is_built_in": true, + "is_time": true, + "is_dimension": true, + "field_type": "string", + "is_analyzed": false, + "is_delete": false + }, + { + "field_name": "app", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.app", + "field_index": 1 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "app_name", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.app_name", + "field_index": 2 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "bk_biz_id", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "bkbizid", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.bk_biz_id", + "field_index": 3 + }, + "is_disabled": false, + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "bk_cloud_id", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "bkcloudid", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.bk_cloud_id", + "field_index": 4 + }, + "is_disabled": false, + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "bs_status", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.bs_status", + "field_index": 5 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "bs_tag", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.bs_tag", + "field_index": 6 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "bs_taskid", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.bs_taskid", + "field_index": 7 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "cluster_domain", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.cluster_domain", + "field_index": 8 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "cluster_id", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.cluster_id", + "field_index": 9 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "cluster_name", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.cluster_name", + "field_index": 10 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "cluster_type", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.cluster_type", + "field_index": 11 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "end_time", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.end_time", + "field_index": 12 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "file_name", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.file_name", + "field_index": 13 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "file_path", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.file_path", + "field_index": 14 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "file_size", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.file_size", + "field_index": 15 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "ip", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "sys_ip", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.ip", + "field_index": 16 + }, + "is_disabled": false, + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "meta_role", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.meta_role", + "field_index": 17 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "my_file_num", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.my_file_num", + "field_index": 18 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "pitr_binlog_index", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.pitr_binlog_index", + "field_index": 19 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "pitr_date", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.pitr_date", + "field_index": 20 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "pitr_file_type", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.pitr_file_type", + "field_index": 21 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "pitr_fullname", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.pitr_fullname", + "field_index": 22 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "pitr_last_pos", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.pitr_last_pos", + "field_index": 23 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "port", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "sys_port", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.port", + "field_index": 24 + }, + "is_disabled": false, + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "related_bill_id", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.related_bill_id", + "field_index": 25 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "releate_bill_info", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.releate_bill_info", + "field_index": 26 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "report_type", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.report_type", + "field_index": 27 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "role_type", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.role_type", + "field_index": 28 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "server_ip", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.server_ip", + "field_index": 29 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "server_port", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.server_port", + "field_index": 30 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "set_name", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.set_name", + "field_index": 31 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "src", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.src", + "field_index": 32 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "start_time", + "type": "string", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "keyword", + "real_path": "bk_separator_object.start_time", + "field_index": 33 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "string", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + }, + { + "field_name": "total_file_num", + "type": "float", + "tag": "dimension", + "default_value": null, + "is_config_by_user": true, + "description": "", + "unit": "", + "alias_name": "", + "option": { + "es_type": "integer", + "real_path": "bk_separator_object.total_file_num", + "field_index": 34 + }, + "is_disabled": false, + "is_case_sensitive": false, + "tokenize_on_chars": "", + "is_built_in": false, + "is_time": false, + "field_type": "int", + "is_analyzed": false, + "is_delete": false, + "is_dimension": true + } + ] +} \ No newline at end of file diff --git a/dbm-ui/backend/env/bklog.py b/dbm-ui/backend/env/bklog.py index e39b276a87..39628224da 100644 --- a/dbm-ui/backend/env/bklog.py +++ b/dbm-ui/backend/env/bklog.py @@ -28,3 +28,4 @@ BKLOG_REDIS_FULLBACKUP_RESULT_RETENTION = get_type_env(key="BKLOG_REDIS_FULLBACKUP_RESULT_RETENTION", _type=int) BKLOG_REDIS_BIGKEY_RETENTION = get_type_env(key="BKLOG_REDIS_BIGKEY_RETENTION", _type=int) BKLOG_REDIS_SLOWLOG_RETENTION = get_type_env(key="BKLOG_REDIS_SLOWLOG_RETENTION", _type=int) +BKLOG_MONGODB_BACKUP_RESULT_RETENTION = get_type_env(key="BKLOG_MONGODB_BACKUP_RESULT_RETENTION", _type=int)