[improve] Improvements to NVIDIA's monitoring history charts are not displayed (#4123)

This commit is contained in:
Duansg
2026-04-21 15:08:13 +08:00
committed by GitHub
parent e57d617db9
commit 42eec4d559
2 changed files with 38 additions and 77 deletions
@@ -208,77 +208,6 @@ params:
required: false
# hide param-true or false
hide: true
# field-param field key
- field: proxyHost
# name-param field display i18n name
name:
zh-CN: 代理主机
en-US: Proxy Host
ja-JP: プロキシホスト
# type-param field type(most mapping the html input type)
type: text
# required-true or false
required: false
# hide param-true or false
hide: true
- field: proxyPort
# name-param field display i18n name
name:
zh-CN: 代理端口
en-US: Proxy Port
ja-JP: プロキシポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
range: '[0,65535]'
# required-true or false
required: false
# hide param-true or false
hide: true
# default value
defaultValue: 22
# field-param field key
- field: proxyUsername
# name-param field display i18n name
name:
zh-CN: 代理用户名
en-US: Proxy Username
ja-JP: プロキシユーザー名
# type-param field type(most mapping the html input type)
type: text
# when type is text, use limit to limit string length
limit: 50
# required-true or false
required: false
# hide param-true or false
hide: true
# field-param field key
- field: proxyPassword
# name-param field display i18n name
name:
zh-CN: 代理密码
en-US: Proxy Password
ja-JP: プロキシパスワード
# type-param field type(most mapping the html input tag)
type: password
# required-true or false
required: false
# hide param-true or false
hide: true
# field-param field key
- field: proxyPrivateKey
# name-param field display i18n name
name:
zh-CN: 代理主机私钥
en-US: proxyPrivateKey
ja-JP: プロキシ秘密鍵
# type-param field type(most mapping the html input type)
type: textarea
placeholder: -----BEGIN RSA PRIVATE KEY-----
# required-true or false
required: false
# hide param-true or false
hide: true
# collect metrics config list
metrics:
# metrics - basic, inner monitoring metrics (responseTime - response time)
@@ -306,48 +235,66 @@ metrics:
zh-CN: 显卡名称
en-US: System Version
ja-JP: 名前
- field: utilization.gpu[%]
- field: utilization_gpu
type: 0
unit: '%'
i18n:
zh-CN: GPU利用率
en-US: GPU Utilization
ja-JP: GPU使用率
- field: utilization.memory[%]
- field: utilization_memory
type: 0
unit: '%'
i18n:
zh-CN: 显存利用率
en-US: Memory Utilization
ja-JP: メモリ使用率
- field: memory.total[MiB]
- field: memory_total
type: 1
unit: 'MiB'
i18n:
zh-CN: 总显存
en-US: Total Memory
ja-JP: メモリ容量
- field: memory.used[MiB]
- field: memory_used
type: 0
unit: 'MiB'
i18n:
zh-CN: 已用显存
en-US: Used Memory
ja-JP: 使用したメモリ
- field: memory.free[MiB]
- field: memory_free
type: 0
unit: 'MiB'
i18n:
zh-CN: 空闲显存
en-US: Free Memory
ja-JP: 利用可能メモリ
- field: temperature.gpu
- field: temperature_gpu
type: 1
unit: '°C'
i18n:
zh-CN: 显卡温度
en-US: GPU Temperature
ja-JP: GPU温度
aliasFields:
- index
- name
- utilization.gpu[%]
- utilization.memory[%]
- memory.total[MiB]
- memory.used[MiB]
- memory.free[MiB]
- temperature_gpu
calculates:
- index
- name
- utilization_gpu = utilization.gpu[%]
- utilization_memory = utilization.memory[%]
- memory_total = memory.total[MiB]
- memory_used = memory.used[MiB]
- memory_free = memory.free[MiB]
- temperature_gpu = temperature.gpu
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: ssh
# the config content when protocol is ssh
@@ -43,6 +43,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -84,6 +85,19 @@ class AppServiceTest {
assertDoesNotThrow(() -> appService.getAppParamDefines("jvm"));
}
@Test
void getAppParamDefinesShouldNotContainDuplicateFields() {
List<ParamDefineInfo> paramDefines = appService.getAppParamDefines("nvidia");
Map<String, Long> fieldCounts = paramDefines.stream()
.collect(Collectors.groupingBy(ParamDefineInfo::getField, Collectors.counting()));
assertTrue(fieldCounts.values().stream().allMatch(count -> count == 1),
() -> "Duplicate param fields found: " + fieldCounts.entrySet().stream()
.filter(entry -> entry.getValue() > 1)
.map(Map.Entry::getKey)
.collect(Collectors.joining(", ")));
}
@Test
void getAppDefine() {
assertDoesNotThrow(() -> appService.getAppDefine("jvm"));