Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use working set bytes if usage bytes is zero #25428

Merged
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ https://github.com/elastic/beats/compare/v7.12.0...v7.12.1[View commits]
*Metricbeat*

- Ignore unsupported derive types for filesystem metricset. {issue}22501[22501] {pull}24502[24502]
- Use working set bytes when memory usage is not reported. {pull}25428[25428]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be added in CHANGELOG.next.asciidoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Sorry!



==== Added
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/kubernetes/pod/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func eventMapping(content []byte, perfMetrics *util.PerfMetricsCache) ([]common.

coresLimit += perfMetrics.ContainerCoresLimit.GetWithDefault(cuid, nodeCores)
memLimit += perfMetrics.ContainerMemLimit.GetWithDefault(cuid, nodeMem)

if usageMem == 0 && workingSet > 0 {
usageMem = workingSet
}
}

podEvent := common.MapStr{
Expand Down