From adb735c7dd4ce6c39b744462a231669eb1a7035c Mon Sep 17 00:00:00 2001 From: Alex K <8418476+fearful-symmetry@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:54:41 -0700 Subject: [PATCH] revert WSS process reporting for windows (#22055) (#22063) * revert WSS process reporting for windows * add changelog (cherry picked from commit ba2b2f935f1c6badc316f62417d87d630991ad2f) --- CHANGELOG.next.asciidoc | 1 + metricbeat/module/system/process/process.go | 15 +-------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 436b41081cea..919b87de09c0 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -423,6 +423,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* diff --git a/metricbeat/module/system/process/process.go b/metricbeat/module/system/process/process.go index c99ffaa1123f..141a4a3a62de 100644 --- a/metricbeat/module/system/process/process.go +++ b/metricbeat/module/system/process/process.go @@ -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,