修复识别运行kvm虚拟机的独服为虚拟机 (#6)
* fix distinguish kvm host as guset * Fix spelling errors * Update .gitignore * update contributors[no ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
abf3a7150b
commit
4c7faecf1b
@ -7,6 +7,9 @@ Agent of Nezha Monitoring
|
|||||||
<!--GAMFC_DELIMITER--><a href="https://github.com/naiba" title="naiba">
|
<!--GAMFC_DELIMITER--><a href="https://github.com/naiba" title="naiba">
|
||||||
<img src="https://avatars.githubusercontent.com/u/29243953?v=4" width="50;" alt="naiba"/>
|
<img src="https://avatars.githubusercontent.com/u/29243953?v=4" width="50;" alt="naiba"/>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/wwng2333" title="Crazy">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/17147265?v=4" width="50;" alt="Crazy"/>
|
||||||
|
</a>
|
||||||
<a href="https://github.com/zhangnew" title="zhangnew">
|
<a href="https://github.com/zhangnew" title="zhangnew">
|
||||||
<img src="https://avatars.githubusercontent.com/u/9146834?v=4" width="50;" alt="zhangnew"/>
|
<img src="https://avatars.githubusercontent.com/u/9146834?v=4" width="50;" alt="zhangnew"/>
|
||||||
</a>
|
</a>
|
||||||
|
@ -46,7 +46,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
println("host.Info error:", err)
|
println("host.Info error:", err)
|
||||||
} else {
|
} else {
|
||||||
if hi.VirtualizationSystem != "" {
|
if hi.VirtualizationRole == "guest" {
|
||||||
cpuType = "Virtual"
|
cpuType = "Virtual"
|
||||||
} else {
|
} else {
|
||||||
cpuType = "Physical"
|
cpuType = "Physical"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user