Exclude cached memory on docker input plugin (#4383)

This commit is contained in:
Mathevet julien 2018-07-18 01:02:03 +02:00 committed by Greg
parent f363e70f33
commit 4c2786298d
1 changed files with 1 additions and 1 deletions

View File

@ -534,11 +534,11 @@ func parseContainerStats(
if daemonOSType != "windows" {
memfields["limit"] = stat.MemoryStats.Limit
memfields["usage"] = stat.MemoryStats.Usage
memfields["max_usage"] = stat.MemoryStats.MaxUsage
mem := calculateMemUsageUnixNoCache(stat.MemoryStats)
memLimit := float64(stat.MemoryStats.Limit)
memfields["usage"] = uint64(mem)
memfields["usage_percent"] = calculateMemPercentUnixNoCache(memLimit, mem)
} else {
memfields["commit_bytes"] = stat.MemoryStats.Commit