This is an automated email from the ASF dual-hosted git repository.
gongchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new ddfa60e59 [improve] add spring tidb i18n (#2512)
ddfa60e59 is described below
commit ddfa60e59714f79309a70f5823a42c9cf8520215
Author: aias00 <[email protected]>
AuthorDate: Mon Aug 12 23:04:48 2024 +0800
[improve] add spring tidb i18n (#2512)
Co-authored-by: tomsun28 <[email protected]>
---
.../src/main/resources/define/app-springboot2.yml | 63 ++++++++++++++++++++++
manager/src/main/resources/define/app-tidb.yml | 63 ++++++++++++++++++++++
2 files changed, 126 insertions(+)
diff --git a/manager/src/main/resources/define/app-springboot2.yml
b/manager/src/main/resources/define/app-springboot2.yml
index 03bff8e07..a6db6b6cc 100644
--- a/manager/src/main/resources/define/app-springboot2.yml
+++ b/manager/src/main/resources/define/app-springboot2.yml
@@ -109,6 +109,9 @@ params:
metrics:
# metrics - available
- name: available
+ i18n:
+ zh-CN: 可用性
+ en-US: Availability
# 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
priority: 0
@@ -118,6 +121,9 @@ metrics:
- field: responseTime
type: 0
unit: ms
+ i18n:
+ zh-CN: 响应时间
+ en-US: Response Time
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp,
sdk
protocol: http
# Specific collection configuration when protocol is http protocol
@@ -142,22 +148,43 @@ metrics:
parseType: default
# metrics - environment
- name: environment
+ i18n:
+ zh-CN: 环境信息
+ en-US: Environment
priority: 1
# The specific monitoring metrics in the metric group.
fields:
# The metric information, including field name, type of the field
(0-number, 1-string), whether it is an instance primary key, and the unit of
the metric.
- field: profile
type: 1
+ i18n:
+ zh-CN: 配置文件
+ en-US: Profile
- field: port
type: 0
+ i18n:
+ zh-CN: 端口
+ en-US: Port
- field: os
type: 1
+ i18n:
+ zh-CN: 操作系统
+ en-US: Operating System
- field: os_arch
type: 1
+ i18n:
+ zh-CN: 操作系统架构
+ en-US: Operating System Architecture
- field: jdk_vendor
type: 1
+ i18n:
+ zh-CN: JDK 厂商
+ en-US: JDK Vendor
- field: jvm_version
type: 1
+ i18n:
+ zh-CN: JVM 版本
+ en-US: JVM Version
# metric alias list, used to identify metrics in query results
aliasFields:
- $.activeProfiles
@@ -200,6 +227,9 @@ metrics:
parseScript: '$'
# metrics - thread_state
- name: thread_state
+ i18n:
+ zh-CN: 线程状态
+ en-US: Thread State
# Whether to display the metric group in the query result, the default is
true
visible: false
# The specific monitoring metrics in the metric group.
@@ -207,6 +237,9 @@ metrics:
fields:
- field: state
type: 1
+ i18n:
+ zh-CN: 状态
+ en-US: State
protocol: http
http:
# Host: ipv4 ipv6 domain
@@ -230,13 +263,22 @@ metrics:
parseScript: '$.availableTags[?(@.tag == "state")].values[*]'
- name: threads
+ i18n:
+ zh-CN: 线程
+ en-US: Threads
priority: 3
fields:
- field: state
type: 1
+ i18n:
+ zh-CN: 状态
+ en-US: State
label: true
- field: size
type: 0
+ i18n:
+ zh-CN: 数量
+ en-US: Size
aliasFields:
- $.measurements[?(@.statistic == "VALUE")].value
calculates:
@@ -257,11 +299,17 @@ metrics:
parseScript: '$'
- name: space_name
+ i18n:
+ zh-CN: 空间名称
+ en-US: Space Name
visible: false
priority: 4
fields:
- field: id
type: 1
+ i18n:
+ zh-CN: ID
+ en-US: ID
protocol: http
http:
host: ^_^host^_^
@@ -277,13 +325,22 @@ metrics:
parseScript: '$.availableTags[?(@.tag == "id")].values[*]'
- name: memory_used
+ i18n:
+ zh-CN: 内存使用
+ en-US: Memory Used
priority: 5
fields:
- field: space
type: 1
+ i18n:
+ zh-CN: 空间
+ en-US: Space
label: true
- field: mem_used
type: 0
+ i18n:
+ zh-CN: 内存使用
+ en-US: Memory Used
unit: MB
aliasFields:
- $.measurements[?(@.statistic == "VALUE")].value
@@ -307,10 +364,16 @@ metrics:
parseScript: '$'
- name: health
+ i18n:
+ zh-CN: 健康
+ en-US: Health
priority: 6
fields:
- field: status
type: 1
+ i18n:
+ zh-CN: 状态
+ en-US: Status
protocol: http
http:
host: ^_^host^_^
diff --git a/manager/src/main/resources/define/app-tidb.yml
b/manager/src/main/resources/define/app-tidb.yml
index b0a58c557..2d843bbe6 100644
--- a/manager/src/main/resources/define/app-tidb.yml
+++ b/manager/src/main/resources/define/app-tidb.yml
@@ -118,6 +118,9 @@ params:
metrics:
# metrics - status
- name: status
+ i18n:
+ zh-CN: 状态
+ en-US: Status
# 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
priority: 0
@@ -126,10 +129,19 @@ metrics:
# field-metric name, type-metric type(0-number,1-string), unit-metric
unit('%','ms','MB'), label-whether it is a metrics label field
- field: connections
type: 0
+ i18n:
+ zh-CN: 连接数
+ en-US: Connections
- field: version
type: 1
+ i18n:
+ zh-CN: 版本
+ en-US: Version
- field: git_hash
type: 1
+ i18n:
+ zh-CN: Git Hash
+ en-US: Git Hash
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp,
sdk
protocol: http
http:
@@ -147,30 +159,66 @@ metrics:
parseScript: '$'
- name: stores
+ i18n:
+ zh-CN: 存储
+ en-US: Stores
priority: 1
fields:
- field: address
type: 1
+ i18n:
+ zh-CN: 地址
+ en-US: Address
- field: version
type: 1
+ i18n:
+ zh-CN: 版本
+ en-US: Version
- field: status_address
type: 1
+ i18n:
+ zh-CN: 状态地址
+ en-US: Status Address
- field: deploy_path
type: 1
+ i18n:
+ zh-CN: 部署路径
+ en-US: Deploy Path
- field: state_name
type: 1
+ i18n:
+ zh-CN: 状态名称
+ en-US: State Name
- field: capacity
type: 1
+ i18n:
+ zh-CN: 容量
+ en-US: Capacity
- field: available
type: 1
+ i18n:
+ zh-CN: 可用
+ en-US: Available
- field: used_size
type: 1
+ i18n:
+ zh-CN: 已用
+ en-US: Used
- field: start_ts
type: 1
+ i18n:
+ zh-CN: 启动时间
+ en-US: Start Time
- field: last_heartbeat_ts
type: 1
+ i18n:
+ zh-CN: 上次心跳时间
+ en-US: Last Heartbeat Time
- field: uptime
type: 1
+ i18n:
+ zh-CN: 启动时长
+ en-US: Uptime
aliasFields:
- $.store.address
- $.store.version
@@ -206,6 +254,9 @@ metrics:
parseScript: '$.stores.*'
- name: basic
+ i18n:
+ zh-CN: 基本信息
+ en-US: Basic Info
# 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
priority: 2
@@ -214,13 +265,25 @@ metrics:
# field-metric name, type-metric type(0-number,1-string), unit-metric
unit('%','ms','MB'), label-whether it is a metrics label field
- field: version
type: 1
+ i18n:
+ zh-CN: 版本
+ en-US: Version
label: true
- field: port
type: 1
+ i18n:
+ zh-CN: 端口
+ en-US: Port
- field: datadir
type: 1
+ i18n:
+ zh-CN: 数据目录
+ en-US: Data Directory
- field: max_connections
type: 0
+ i18n:
+ zh-CN: 最大连接数
+ en-US: Max Connections
# (optional)metrics field alias name, it is used as an alias field to map
and convert the collected data and metrics field
aliasFields:
- version
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]