diff --git a/.gitignore b/.gitignore index 09404fc..95a7ed0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .DS_Store /agent -*.pprof \ No newline at end of file +*.pprof diff --git a/README.md b/README.md index d272a2c..d4282d6 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,9 @@ Agent of Nezha Monitoring naiba + + Crazy + zhangnew diff --git a/pkg/monitor/monitor.go b/pkg/monitor/monitor.go index aea759c..6900184 100644 --- a/pkg/monitor/monitor.go +++ b/pkg/monitor/monitor.go @@ -46,7 +46,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host { if err != nil { println("host.Info error:", err) } else { - if hi.VirtualizationSystem != "" { + if hi.VirtualizationRole == "guest" { cpuType = "Virtual" } else { cpuType = "Physical"