You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have use metricbeat to collect docker memory, but found that the data of memory (suce as memory usage) was different from the "docker stats", is it right ?
metricbeat: 7.6.0
The text was updated successfully, but these errors were encountered:
So, I did some digging, and there's actually a fair bit of difference between how we calculate percentages, and I'm guessing that our implementation is based on an outdated version of what docker did. We just do metric/memory_limit for any given memory value, but docker is (now) just a tad more sophisticated:
// cgroup v1
if v, isCgroup1 := mem.Stats["total_inactive_file"]; isCgroup1 && v < mem.Usage {
return float64(mem.Usage - v)
}
// cgroup v2
if v := mem.Stats["inactive_file"]; v < mem.Usage {
return float64(mem.Usage - v)
}
return float64(mem.Usage)
I'm leaning towards calling this a bug, based on how other platforms.
Hi,I have met a problem as follows:
i have use metricbeat to collect docker memory, but found that the data of memory (suce as memory usage) was different from the "docker stats", is it right ?
metricbeat: 7.6.0
The text was updated successfully, but these errors were encountered: