From ae542fa90774f7a4987f739c9e41baf68f080ba0 Mon Sep 17 00:00:00 2001 From: Ben <8350029+bk-saas@user.noreply.gitee.com> Date: Sun, 24 Dec 2023 16:51:38 +0800 Subject: [PATCH 1/2] feature: add metrics i18n for app-springboot3.yml --- .../main/resources/define/app-springboot3.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/manager/src/main/resources/define/app-springboot3.yml b/manager/src/main/resources/define/app-springboot3.yml index 758599d4e25..39b938a389b 100644 --- a/manager/src/main/resources/define/app-springboot3.yml +++ b/manager/src/main/resources/define/app-springboot3.yml @@ -111,6 +111,9 @@ metrics: # metrics - available # 监控指标 - available - name: available + i18n: + zh-CN: 可用性 + en-US: available # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 @@ -122,6 +125,9 @@ metrics: # field-metric name, type-metric type(0-number,1-string), instance-is instance primary key, unit-metric unit # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label-是否是指标标签字段 unit:指标单位 - field: responseTime + i18n: + zh-CN: 响应时间 + en-US: Response Time type: 0 unit: ms # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk @@ -155,6 +161,9 @@ metrics: priority: 1 fields: - field: state + i18n: + zh-CN: 状态 + en-US: state type: 1 protocol: http http: @@ -167,12 +176,21 @@ metrics: parseScript: '$.availableTags[?(@.tag == "state")].values[*]' - name: threads + i18n: + zh-CN: 线程 + en-US: threads priority: 2 fields: - field: state + i18n: + zh-CN: 状态 + en-US: state type: 1 label: true - field: size + i18n: + zh-CN: 大小 + en-US: size type: 0 aliasFields: - $.measurements[?(@.statistic == "VALUE")].value @@ -206,12 +224,21 @@ metrics: parseScript: '$.availableTags[?(@.tag == "id")].values[*]' - name: memory_used + i18n: + zh-CN: 内存使用 + en-US: memory used priority: 4 fields: - field: space + i18n: + zh-CN: 空间 + en-US: space type: 1 label: true - field: mem_used + i18n: + zh-CN: 已使用 + en-US: memory used type: 0 unit: MB aliasFields: @@ -232,9 +259,15 @@ metrics: parseScript: '$' - name: health + i18n: + zh-CN: 健康状态 + en-US: memory used priority: 5 fields: - field: status + i18n: + zh-CN: 状态 + en-US: status type: 1 protocol: http http: From 3042b90e561c981931e2c433b8efa5127ad24f96 Mon Sep 17 00:00:00 2001 From: Ben <8350029+bk-saas@user.noreply.gitee.com> Date: Mon, 25 Dec 2023 12:27:02 +0800 Subject: [PATCH 2/2] feature: add metrics i18n for app-docker.yml --- .../src/main/resources/define/app-docker.yml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/manager/src/main/resources/define/app-docker.yml b/manager/src/main/resources/define/app-docker.yml index b82c47d7c27..bd7061764fe 100644 --- a/manager/src/main/resources/define/app-docker.yml +++ b/manager/src/main/resources/define/app-docker.yml @@ -70,6 +70,9 @@ params: required: false metrics: - name: system + i18n: + zh-CN: 宿主机 + en-US: system # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 @@ -81,29 +84,65 @@ metrics: # metric information includes field name type field type: 0-number, 1-string whether instance is the primary key of the instance unit: metric unit # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label-是否是指标标签字段 unit:指标单位 - field: name + i18n: + zh-CN: 主机名 + en-US: name type: 1 - field: version + i18n: + zh-CN: 版本 + en-US: version type: 1 - field: os + i18n: + zh-CN: 操作系统 + en-US: os type: 1 - field: root_dir + i18n: + zh-CN: 根目录 + en-US: root dir type: 1 - field: containers + i18n: + zh-CN: 容器总数 + en-US: containers type: 0 - field: containers_running + i18n: + zh-CN: 运行容器数 + en-US: running containers type: 0 - field: containers_paused + i18n: + zh-CN: 暂停容器数 + en-US: paused containers type: 0 - field: containers_stopped + i18n: + zh-CN: 已停止容器数 + en-US: stopped containers type: 0 - field: images + i18n: + zh-CN: 镜像数 + en-US: images type: 0 - field: ncpu + i18n: + zh-CN: CPU数量 + en-US: ncpu type: 0 - field: mem_total + i18n: + zh-CN: 内存总量 + en-US: total memory type: 0 unit: MB - field: system_time + i18n: + zh-CN: 系统时间 + en-US: system time type: 1 aliasFields: - Name @@ -159,6 +198,9 @@ metrics: parseType: default - name: containers + i18n: + zh-CN: 容器 + en-US: containers # The smaller the priority value (0-127), the higher the priority of the metrics. Lower-priority metricss will be scheduled after higher-priority metricss have been collected. metricss with the same priority will be scheduled to collect data in parallel. # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 @@ -170,16 +212,34 @@ metrics: # metric information includes field name type field type: 0-number, 1-string whether instance is the primary key of the instance unit: metric unit # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label-是否是指标标签字段 unit:指标单位 - field: id + i18n: + zh-CN: ID + en-US: ID type: 1 - field: name + i18n: + zh-CN: 名称 + en-US: name type: 1 - field: image + i18n: + zh-CN: 镜像 + en-US: image type: 1 - field: command + i18n: + zh-CN: 启动命令 + en-US: command type: 1 - field: state + i18n: + zh-CN: 当前状态 + en-US: state type: 1 - field: status + i18n: + zh-CN: 更新时间 + en-US: status type: 1 aliasFields: - Id @@ -222,24 +282,48 @@ metrics: parseScript: '$.*' - name: stats + i18n: + zh-CN: 状态详情 + en-US: stats priority: 2 fields: - field: name + i18n: + zh-CN: 名称 + en-US: name type: 1 - field: available_memory + i18n: + zh-CN: 可用内存 + en-US: available memory type: 0 unit: MB - field: used_memory + i18n: + zh-CN: 已用内存 + en-US: used memory type: 0 unit: MB - field: memory_usage + i18n: + zh-CN: 内存使用率 + en-US: memory usage type: 0 unit: '%' - field: cpu_delta + i18n: + zh-CN: 已使用CPU数 + en-US: cpu delta type: 0 - field: number_cpus + i18n: + zh-CN: 可使用CPU数 + en-US: cpus number type: 0 - field: cpu_usage + i18n: + zh-CN: CPU使用率 + en-US: cpu usage type: 0 unit: '%' aliasFields: