实现网络数据包相关统计(商业版本)

This commit is contained in:
GoEdgeLab
2023-10-26 17:17:43 +08:00
parent f5abead40c
commit 1105f9984e
10 changed files with 137 additions and 18 deletions

View File

@@ -414,6 +414,17 @@ func (this *ServerStatBoardService) ComposeServerStatNodeBoard(ctx context.Conte
})
}
networkPacketsValues, err := models.SharedNodeValueDAO.ListValues(tx, "node", req.NodeId, nodeconfigs.NodeValueItemNetworkPackets, nodeconfigs.NodeValueRangeMinute)
if err != nil {
return nil, err
}
for _, v := range networkPacketsValues {
result.NetworkPacketsValues = append(result.NetworkPacketsValues, &pb.NodeValue{
ValueJSON: v.Value,
CreatedAt: int64(v.CreatedAt),
})
}
cacheDirValues, err := models.SharedNodeValueDAO.ListValues(tx, "node", req.NodeId, nodeconfigs.NodeValueItemCacheDir, nodeconfigs.NodeValueRangeMinute)
if err != nil {
return nil, err