mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 09:49:28 +08:00
change agent check for invalid data to use memory usage rather than networks
This commit is contained in:
@@ -260,7 +260,7 @@ func (a *Agent) getContainerStats(ctr *container.ApiInfo) (*container.Stats, err
|
|||||||
name := ctr.Names[0][1:]
|
name := ctr.Names[0][1:]
|
||||||
|
|
||||||
// check if container has valid data, otherwise may be in restart loop (#103)
|
// check if container has valid data, otherwise may be in restart loop (#103)
|
||||||
if len(statsJson.Networks) == 0 {
|
if statsJson.MemoryStats.Usage == 0 {
|
||||||
return nil, fmt.Errorf("%s - invalid data", name)
|
return nil, fmt.Errorf("%s - invalid data", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user