Skip to content

Commit

Permalink
Fix process cgroup memory values
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 elastic#6033
  • Loading branch information
andrewkroh committed Jan 9, 2018
1 parent 8a3365f commit abf0acd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Fix `open_file_descriptor_count` and `max_file_descriptor_count` lost in zookeeper module {pull}5902[5902]
- Fix kubernetes `state_pod` `status.phase` so that the active phase is returned instead of `unknown`. {pull}5980[5980]
- Fix error collecting network_names in Vsphere module. {pull}5962[5962]
- Fix process cgroup memory metrics for memsw, kmem, and kmem_tcp. {issue}6033[6033]

*Packetbeat*

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 abf0acd

Please sign in to comment.