Skip to content

Commit

Permalink
Fix process cgroup memory values (#6034)
Browse files Browse the repository at this point in the history
The mem values were being reported for the memsw, kmem, and kmem_tcp values.

Fixes #6033

(cherry picked from commit 49f6a19)
  • Loading branch information
andrewkroh committed Jan 10, 2018
1 parent b6caa13 commit 7b08164
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
8 changes: 4 additions & 4 deletions metricbeat/module/system/process/cgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
}
Expand Down

0 comments on commit 7b08164

Please sign in to comment.