mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
Merge pull request #13724 from zhaoxiangchun/automated-cherry-pick-of-#13721-upstream-release-3.7
Automated cherry pick of #13721: fix(host): fix guest nicStat Metric in host
This commit is contained in:
@@ -499,14 +499,14 @@ func (m *SGuestMonitor) Netio() jsonutils.JSONObject {
|
||||
uptime, _ := host.Uptime()
|
||||
meta.Set("uptime", jsonutils.NewInt(int64(uptime)))
|
||||
data.Set("meta", meta)
|
||||
data.Set("bits_recv", jsonutils.NewInt(int64(nicStat.BytesRecv*8)))
|
||||
data.Set("bits_sent", jsonutils.NewInt(int64(nicStat.BytesSent*8)))
|
||||
data.Set("packets_recv", jsonutils.NewInt(int64(nicStat.PacketsRecv)))
|
||||
data.Set("packets_sent", jsonutils.NewInt(int64(nicStat.PacketsSent)))
|
||||
data.Set("err_out", jsonutils.NewInt(int64(nicStat.Errout)))
|
||||
data.Set("err_in", jsonutils.NewInt(int64(nicStat.Errin)))
|
||||
data.Set("drop_out", jsonutils.NewInt(int64(nicStat.Dropout)))
|
||||
data.Set("drop_in", jsonutils.NewInt(int64(nicStat.Dropin)))
|
||||
data.Set("bits_recv", jsonutils.NewInt(int64(nicStat.BytesSent*8)))
|
||||
data.Set("bits_sent", jsonutils.NewInt(int64(nicStat.BytesRecv*8)))
|
||||
data.Set("packets_recv", jsonutils.NewInt(int64(nicStat.PacketsSent)))
|
||||
data.Set("packets_sent", jsonutils.NewInt(int64(nicStat.PacketsRecv)))
|
||||
data.Set("err_out", jsonutils.NewInt(int64(nicStat.Errin)))
|
||||
data.Set("err_in", jsonutils.NewInt(int64(nicStat.Errout)))
|
||||
data.Set("drop_out", jsonutils.NewInt(int64(nicStat.Dropin)))
|
||||
data.Set("drop_in", jsonutils.NewInt(int64(nicStat.Dropout)))
|
||||
res.Add(data)
|
||||
}
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user