diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 20116ff7e1b..5d8e2d94752 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -41,6 +41,8 @@ https://github.com/elastic/beats/compare/v6.1.1...6.1[Check the HEAD diff] *Metricbeat* +- Fix process cgroup memory metrics for memsw, kmem, and kmem_tcp. {issue}6033[6033] + *Packetbeat* *Winlogbeat* diff --git a/metricbeat/module/system/process/cgroup.go b/metricbeat/module/system/process/cgroup.go index a05de91069a..1ac7d676840 100644 --- a/metricbeat/module/system/process/cgroup.go +++ b/metricbeat/module/system/process/cgroup.go @@ -117,14 +117,14 @@ func cgroupMemoryToMapStr(memory *cgroup.MemorySubsystem) common.MapStr { addMemData := func(key string, m common.MapStr, data cgroup.MemoryData) { m[key] = common.MapStr{ - "failures": memory.Mem.FailCount, + "failures": data.FailCount, "limit": common.MapStr{ - "bytes": memory.Mem.Limit, + "bytes": data.Limit, }, "usage": common.MapStr{ - "bytes": memory.Mem.Usage, + "bytes": data.Usage, "max": common.MapStr{ - "bytes": memory.Mem.MaxUsage, + "bytes": data.MaxUsage, }, }, }