mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-18 18:49:23 +08:00
feat: 添加虚拟化检测功能
This commit is contained in:
@@ -35,17 +35,18 @@ func uploadBasicInfo() error {
|
||||
ipv4, ipv6, _ := monitoring.GetIPAddress()
|
||||
|
||||
data := map[string]interface{}{
|
||||
"cpu_name": cpu.CPUName,
|
||||
"cpu_cores": cpu.CPUCores,
|
||||
"arch": cpu.CPUArchitecture,
|
||||
"os": osname,
|
||||
"ipv4": ipv4,
|
||||
"ipv6": ipv6,
|
||||
"mem_total": monitoring.Ram().Total,
|
||||
"swap_total": monitoring.Swap().Total,
|
||||
"disk_total": monitoring.Disk().Total,
|
||||
"gpu_name": monitoring.GpuName(),
|
||||
"version": update.CurrentVersion,
|
||||
"cpu_name": cpu.CPUName,
|
||||
"cpu_cores": cpu.CPUCores,
|
||||
"arch": cpu.CPUArchitecture,
|
||||
"os": osname,
|
||||
"ipv4": ipv4,
|
||||
"ipv6": ipv6,
|
||||
"mem_total": monitoring.Ram().Total,
|
||||
"swap_total": monitoring.Swap().Total,
|
||||
"disk_total": monitoring.Disk().Total,
|
||||
"gpu_name": monitoring.GpuName(),
|
||||
"virtualization": monitoring.Virtualized(),
|
||||
"version": update.CurrentVersion,
|
||||
}
|
||||
|
||||
endpoint := strings.TrimSuffix(flags.Endpoint, "/") + "/api/clients/uploadBasicInfo?token=" + flags.Token
|
||||
|
Reference in New Issue
Block a user