Skip to content

Commit

Permalink
revert WSS process reporting for windows (elastic#22055)
Browse files Browse the repository at this point in the history
* revert WSS process reporting for windows

* add changelog

(cherry picked from commit ba2b2f9)
  • Loading branch information
fearful-symmetry committed Oct 21, 2020
1 parent f0ea383 commit 1e070f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Fix azure storage event format. {pull}21845[21845]
- Fix panic in kubernetes autodiscover related to keystores {issue}21843[21843] {pull}21880[21880]
- [Kubernetes] Remove redundant dockersock volume mount {pull}22009[22009]
- Revert change to report `process.memory.rss` as `process.memory.wss` on Windows. {pull}22055[22055]

*Packetbeat*

Expand Down
15 changes: 1 addition & 14 deletions metricbeat/module/system/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,24 +150,11 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error {
rootFields.Put("process.args", args)
}

// This is a temporary fix until we make these changes global across libbeat
// This logic should happen in libbeat getProcessEvent()

// There's some more Windows memory quirks we need to deal with.
// "rss" is a linux concept, but "wss" is a direct match on Windows.
// "share" is also unavailable on Windows.
// "share" is unavailable on Windows.
if runtime.GOOS == "windows" {
proc.Delete("memory.share")
}

if m.IsAgent {
if runtime.GOOS == "windows" {
if setSize := getAndRemove(proc, "memory.rss"); setSize != nil {
proc.Put("memory.wss", setSize)
}
}
}

e := mb.Event{
RootFields: rootFields,
MetricSetFields: proc,
Expand Down

0 comments on commit 1e070f7

Please sign in to comment.