Skip to content

Commit

Permalink
[improve] add hive i18n (#2504)
Browse files Browse the repository at this point in the history
Co-authored-by: tomsun28 <[email protected]>
  • Loading branch information
Aias00 and tomsun28 authored Aug 11, 2024
1 parent 3d3d881 commit 3250bc7
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 1 deletion.
74 changes: 73 additions & 1 deletion manager/src/main/resources/define/app-hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ params:
- field: host
# name-param field display i18n name
name:
zh-CN: 目标Host
zh-CN: 目标 Host
en-US: Target Host
# type-param field type(most mapping the html input type)
type: host
Expand Down Expand Up @@ -83,13 +83,19 @@ 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
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- 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
Expand All @@ -110,15 +116,30 @@ metrics:
parseType: default

- name: basic
i18n:
zh-CN: 基本信息
en-US: Basic
priority: 1
fields:
- field: vm_name
i18n:
zh-CN: 虚拟机名称
en-US: VM Name
type: 1
- field: vm_vendor
i18n:
zh-CN: 虚拟机供应商
en-US: VM Vendor
type: 1
- field: vm_version
i18n:
zh-CN: 虚拟机版本
en-US: VM Version
type: 1
- field: up_time
i18n:
zh-CN: 运行时间
en-US: Uptime
type: 0
unit: ms
aliasFields:
Expand All @@ -143,21 +164,42 @@ metrics:

# metrics - environment
- name: environment
i18n:
zh-CN: 环境信息
en-US: Environment
priority: 2
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: https_proxyPort
i18n:
zh-CN: https 代理端口
en-US: https Proxy Port
type: 0
- field: os_name
i18n:
zh-CN: os 名称
en-US: OS Name
type: 1
- field: os_version
i18n:
zh-CN: os 版本
en-US: OS Version
type: 1
- field: os_arch
i18n:
zh-CN: os 架构
en-US: OS Arch
type: 1
- field: java_runtime_name
i18n:
zh-CN: java 运行时名称
en-US: Java Runtime Name
type: 1
- field: java_runtime_version
i18n:
zh-CN: java 运行时版本
en-US: Java Runtime Version
type: 1
# metric alias list, used to identify metrics in query results
aliasFields:
Expand Down Expand Up @@ -195,15 +237,30 @@ metrics:
parseScript: '$'

- name: thread
i18n:
zh-CN: 线程
en-US: Thread
priority: 4
fields:
- field: thread_count
i18n:
zh-CN: 线程数
en-US: Thread Count
type: 0
- field: total_started_thread
i18n:
zh-CN: 启动线程数
en-US: Total Started Thread
type: 0
- field: peak_thread_count
i18n:
zh-CN: 峰值线程数
en-US: Peak Thread Count
type: 0
- field: daemon_thread_count
i18n:
zh-CN: 守护线程数
en-US: Daemon Thread Count
type: 0
aliasFields:
- $.beans[?(@.name == 'java.lang:type=Threading')].ThreadCount
Expand All @@ -226,18 +283,33 @@ metrics:
parseScript: '$'

- name: code_cache
i18n:
zh-CN: 代码缓存
en-US: Code Cache
priority: 5
fields:
- field: committed
i18n:
zh-CN: 已提交
en-US: Committed
type: 1
unit: MB
- field: init
i18n:
zh-CN: 初始化
en-US: Init
type: 0
unit: MB
- field: max
i18n:
zh-CN: 最大
en-US: Max
type: 0
unit: MB
- field: used
i18n:
zh-CN: 已使用
en-US: Used
type: 0
unit: MB
aliasFields:
Expand Down
69 changes: 69 additions & 0 deletions manager/src/main/resources/define/app-iceberg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ metrics:
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- 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
Expand All @@ -110,15 +113,30 @@ metrics:
parseType: default

- name: basic
i18n:
zh-CN: 基本信息
en-US: Basic
priority: 1
fields:
- field: vm_name
i18n:
zh-CN: 虚拟机名称
en-US: VM Name
type: 1
- field: vm_vendor
i18n:
zh-CN: 虚拟机供应商
en-US: VM Vendor
type: 1
- field: vm_version
i18n:
zh-CN: 虚拟机版本
en-US: VM Version
type: 1
- field: up_time
i18n:
zh-CN: 运行时间
en-US: Uptime
type: 0
unit: ms
aliasFields:
Expand All @@ -143,21 +161,42 @@ metrics:

# metrics - environment
- name: environment
i18n:
zh-CN: 环境信息
en-US: Environment
priority: 2
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: https_proxyPort
i18n:
zh-CN: https 代理端口
en-US: https Proxy Port
type: 0
- field: os_name
i18n:
zh-CN: os 名称
en-US: OS Name
type: 1
- field: os_version
i18n:
zh-CN: os 版本
en-US: OS Version
type: 1
- field: os_arch
i18n:
zh-CN: os 架构
en-US: OS Arch
type: 1
- field: java_runtime_name
i18n:
zh-CN: java 运行时名称
en-US: Java Runtime Name
type: 1
- field: java_runtime_version
i18n:
zh-CN: java 运行时版本
en-US: Java Runtime Version
type: 1
# metric alias list, used to identify metrics in query results
aliasFields:
Expand Down Expand Up @@ -195,15 +234,30 @@ metrics:
parseScript: '$'

- name: thread
i18n:
zh-CN: 线程
en-US: Thread
priority: 4
fields:
- field: thread_count
i18n:
zh-CN: 线程数
en-US: Thread Count
type: 0
- field: total_started_thread
i18n:
zh-CN: 启动线程数
en-US: Total Started Thread
type: 0
- field: peak_thread_count
i18n:
zh-CN: 峰值线程数
en-US: Peak Thread Count
type: 0
- field: daemon_thread_count
i18n:
zh-CN: 守护线程数
en-US: Daemon Thread Count
type: 0
aliasFields:
- $.beans[?(@.name == 'java.lang:type=Threading')].ThreadCount
Expand All @@ -226,18 +280,33 @@ metrics:
parseScript: '$'

- name: code_cache
i18n:
zh-CN: 代码缓存
en-US: Code Cache
priority: 5
fields:
- field: committed
i18n:
zh-CN: 已提交
en-US: Committed
type: 1
unit: MB
- field: init
i18n:
zh-CN: 初始化
en-US: Init
type: 0
unit: MB
- field: max
i18n:
zh-CN: 最大
en-US: Max
type: 0
unit: MB
- field: used
i18n:
zh-CN: 已使用
en-US: Used
type: 0
unit: MB
aliasFields:
Expand Down

0 comments on commit 3250bc7

Please sign in to comment.