mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(monitor): register agent_nvidia_smi metrics
This commit is contained in:
@@ -1046,9 +1046,11 @@ type ServerHardwareInfoGPUPCIEInfo struct {
|
||||
type ServerHardwareInfoGPU struct {
|
||||
*IsolatedDeviceModelHardwareInfo
|
||||
|
||||
// isolate device id
|
||||
Id string `json:"id"`
|
||||
// GPU model name
|
||||
Model string `json:"model"`
|
||||
Model string `json:"model"`
|
||||
// PCIE information
|
||||
PCIEInfo *IsolatedDevicePCIEInfo `json:"pcie_info"`
|
||||
}
|
||||
|
||||
|
||||
@@ -788,9 +788,9 @@ type SElasticcache struct {
|
||||
NetworkId string `json:"network_id"`
|
||||
// 带宽
|
||||
Bandwidth int `json:"bandwidth"`
|
||||
// 内网DNS
|
||||
// 内网DNS
|
||||
PrivateDNS string `json:"private_dns"`
|
||||
// 内网IP地址
|
||||
// 内网IP地址
|
||||
PrivateIpAddr string `json:"private_ip_addr"`
|
||||
// 内网访问端口
|
||||
PrivateConnectPort int `json:"private_connect_port"`
|
||||
@@ -1878,9 +1878,9 @@ type SLoadbalancerHealthCheck struct {
|
||||
// 健康检查路径 /
|
||||
HealthCheckHttpCode string `json:"health_check_http_code"`
|
||||
HealthCheckRise int `json:"health_check_rise"`
|
||||
// 健康检查健康阈值 3秒
|
||||
// 健康检查健康阈值 3秒
|
||||
HealthCheckFall int `json:"health_check_fall"`
|
||||
// 健康检查不健康阈值 15秒
|
||||
// 健康检查不健康阈值 15秒
|
||||
HealthCheckTimeout int `json:"health_check_timeout"`
|
||||
// 健康检查超时时间 10秒
|
||||
HealthCheckInterval int `json:"health_check_interval"`
|
||||
@@ -2511,7 +2511,7 @@ type SSchedtag struct {
|
||||
apis.SStandaloneResourceBase
|
||||
apis.SScopedResourceBase
|
||||
DefaultStrategy string `json:"default_strategy"`
|
||||
// Column(VARCHAR(16, charset='ascii'), nullable=True, default='')
|
||||
// Column(VARCHAR(16, charset='ascii'), nullable=True, default=”)
|
||||
ResourceType string `json:"resource_type"`
|
||||
}
|
||||
|
||||
|
||||
@@ -389,6 +389,19 @@ func init() {
|
||||
newMetricFieldCreateInput("temp_c", "Disk device temperature ", "", 1),
|
||||
})
|
||||
|
||||
// agent nvidia_smi
|
||||
RegistryMetricCreateInput("agent_nvidia_smi", "Collect Nvidia GPU metrics",
|
||||
monitor.METRIC_RES_TYPE_AGENT, monitor.METRIC_DATABASE_TELE, 8, []monitor.MetricFieldCreateInput{
|
||||
newMetricFieldCreateInput("clocks_current_graphics", "GPU current clocks, MHz", "", 1),
|
||||
newMetricFieldCreateInput("clocks_current_memory", "GPU current memory clocks, MHz", "", 2),
|
||||
newMetricFieldCreateInput("temperature_gpu", "GPU temperature", "", 3),
|
||||
newMetricFieldCreateInput("memory_total", "GPU memory total size", "", 4),
|
||||
newMetricFieldCreateInput("memory_free", "GPU memory free size", "", 5),
|
||||
newMetricFieldCreateInput("memory_used", "GPU memory used size", "", 6),
|
||||
newMetricFieldCreateInput("utilization_gpu", "GPU utilization", "", 7),
|
||||
newMetricFieldCreateInput("utilization_memory", "GPU memory utilization", "", 8),
|
||||
})
|
||||
|
||||
RegistryMetricCreateInput("storage", "Storage usage",
|
||||
monitor.METRIC_RES_TYPE_STORAGE, monitor.METRIC_DATABASE_TELE, 1, []monitor.MetricFieldCreateInput{
|
||||
newMetricFieldCreateInput("usage_active", "Storage utilization rate", monitor.METRIC_UNIT_PERCENT, 1),
|
||||
|
||||
Reference in New Issue
Block a user