Skip to content

Commit 7234569

Browse files
stefans-elasticmergify[bot]
authored andcommitted
[metricbeat][system] add swap field to system.process.memory metricset (#48334)
* [metricbeat][system] add swap field to system.process.memory metricset * update docs * update NOTICE.txt * remove field mapping * make changelog message more accurate * revert removing of field mapping * resolve PR comment * Update metricbeat/module/system/process/_meta/fields.yml Co-authored-by: Colleen McGinnis <colleen.j.mcginnis@gmail.com> * make update * update swap field ga version --------- Co-authored-by: Colleen McGinnis <colleen.j.mcginnis@gmail.com> (cherry picked from commit 90844ec) # Conflicts: # NOTICE.txt # go.mod # go.sum # metricbeat/module/system/fields.go
1 parent 386a6bb commit 7234569

9 files changed

Lines changed: 89 additions & 3 deletions

File tree

NOTICE.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11387,11 +11387,19 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l
1138711387

1138811388
--------------------------------------------------------------------------------
1138911389
Dependency : github.com/elastic/elastic-agent-system-metrics
11390+
<<<<<<< HEAD
1139011391
Version: v0.13.4
1139111392
Licence type (autodetected): Apache-2.0
1139211393
--------------------------------------------------------------------------------
1139311394

1139411395
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.13.4/LICENSE.txt:
11396+
=======
11397+
Version: v0.13.6
11398+
Licence type (autodetected): Apache-2.0
11399+
--------------------------------------------------------------------------------
11400+
11401+
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.13.6/LICENSE.txt:
11402+
>>>>>>> 90844ec02 ([metricbeat][system] add swap field to system.process.memory metricset (#48334))
1139511403

1139611404
Apache License
1139711405
Version 2.0, January 2004
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# REQUIRED
2+
# Kind can be one of:
3+
# - breaking-change: a change to previously-documented behavior
4+
# - deprecation: functionality that is being removed in a later release
5+
# - bug-fix: fixes a problem in a previous version
6+
# - enhancement: extends functionality but does not break or fix existing behavior
7+
# - feature: new functionality
8+
# - known-issue: problems that we are aware of in a given version
9+
# - security: impacts on the security of a product or a user’s deployment.
10+
# - upgrade: important information for someone upgrading from a prior version
11+
# - other: does not fit into any of the other categories
12+
kind: enhancement
13+
14+
# REQUIRED for all kinds
15+
# Change summary; a 80ish characters long description of the change.
16+
summary: add swap field to system.process.memory metric set in metricbeat
17+
18+
# REQUIRED for breaking-change, deprecation, known-issue
19+
# Long description; in case the summary is not enough to describe the change
20+
# this field accommodate a description without length limits.
21+
# description:
22+
23+
# REQUIRED for breaking-change, deprecation, known-issue
24+
# impact:
25+
26+
# REQUIRED for breaking-change, deprecation, known-issue
27+
# action:
28+
29+
# REQUIRED for all kinds
30+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
31+
component: metricbeat
32+
33+
# AUTOMATED
34+
# OPTIONAL to manually add other PR URLs
35+
# PR URL: A link the PR that added the changeset.
36+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
37+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
38+
# Please provide it if you are adding a fragment for a different PR.
39+
# pr: https://github.com/owner/repo/1234
40+
41+
# AUTOMATED
42+
# OPTIONAL to manually add other issue URLs
43+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
44+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
45+
# issue: https://github.com/owner/repo/1234

docs/reference/metricbeat/exported-fields-system.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,14 @@ Memory-specific statistics per process.
10471047
format: bytes
10481048

10491049

1050+
**`system.process.memory.swap`** {applies_to}`stack: ga 8.19.11`
1051+
: The swap memory used by the process (supported only on Linux kernel version 2.6.34+).
1052+
1053+
type: long
1054+
1055+
format: bytes
1056+
1057+
10501058
## io [_io]
10511059

10521060
Disk I/O Metrics, as forwarded from /proc/[PID]/io. Available on Linux only.

docs/reference/metricbeat/metricbeat-metricset-system-process.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ Here is an example document generated by this metricset:
369369
"pct": 0.0008
370370
},
371371
"share": 16252928,
372-
"size": 1886003200
372+
"size": 1886003200,
373+
"swap": 1302528
373374
},
374375
"num_threads": 9,
375376
"state": "sleeping"

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,13 @@ require (
174174
github.com/elastic/bayeux v1.0.5
175175
github.com/elastic/ebpfevents v0.8.0
176176
github.com/elastic/elastic-agent-autodiscover v0.10.0
177+
<<<<<<< HEAD
177178
github.com/elastic/elastic-agent-libs v0.26.2
178179
github.com/elastic/elastic-agent-system-metrics v0.13.4
180+
=======
181+
github.com/elastic/elastic-agent-libs v0.31.0
182+
github.com/elastic/elastic-agent-system-metrics v0.13.6
183+
>>>>>>> 90844ec02 ([metricbeat][system] add swap field to system.process.memory metricset (#48334))
179184
github.com/elastic/go-elasticsearch/v8 v8.19.0
180185
github.com/elastic/go-freelru v0.16.0
181186
github.com/elastic/go-quark v0.3.0

go.sum

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,17 @@ github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQB
366366
github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE=
367367
github.com/elastic/elastic-agent-client/v7 v7.15.0 h1:nDB7v8TBoNuD6IIzC3z7Q0y+7bMgXoT2DsHfolO2CHE=
368368
github.com/elastic/elastic-agent-client/v7 v7.15.0/go.mod h1:6h+f9QdIr3GO2ODC0Y8+aEXRwzbA5W4eV4dd/67z7nI=
369+
<<<<<<< HEAD
369370
github.com/elastic/elastic-agent-libs v0.26.2 h1:zwytPWmTWSJG80oa9/5FJ6zue47ysI23eMo15LfeWy0=
370371
github.com/elastic/elastic-agent-libs v0.26.2/go.mod h1:fc2noLqosmQorIGbatJfVeh4CL77yiP8ot16/5umeoM=
371372
github.com/elastic/elastic-agent-system-metrics v0.13.4 h1:gX8VdlQyakPcPKFpD7uHv2QLRDyguuKfZgu0LE27V7c=
372373
github.com/elastic/elastic-agent-system-metrics v0.13.4/go.mod h1:lB8veYWYBlA9eF6TahmPN87G1IEgWlbep7QSqLSW90U=
374+
=======
375+
github.com/elastic/elastic-agent-libs v0.31.0 h1:3i/a0n40VPpx+vyB6oBZkTpcsjEGd2LKBiJjSI//j38=
376+
github.com/elastic/elastic-agent-libs v0.31.0/go.mod h1:0xUg7alsNE/WhY9DZRIdTYW75nqSHC1octIAg//j/PQ=
377+
github.com/elastic/elastic-agent-system-metrics v0.13.6 h1:Gwy3siqs5aHAP6RlLXel/irnedXvqdQ+tAzPq/2QOlY=
378+
github.com/elastic/elastic-agent-system-metrics v0.13.6/go.mod h1:JNfnZrC0viAjlJRUzQKKuMpDlXgjXBn4WdWEXQF7jcA=
379+
>>>>>>> 90844ec02 ([metricbeat][system] add swap field to system.process.memory metricset (#48334))
373380
github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo=
374381
github.com/elastic/elastic-transport-go/v8 v8.8.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
375382
github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270 h1:cWPqxlPtir4RoQVCpGSRXmLqjEHpJKbR60rxh1nQZY4=

metricbeat/module/system/fields.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

metricbeat/module/system/process/_meta/data.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@
262262
"pct": 0.0008
263263
},
264264
"share": 16252928,
265-
"size": 1886003200
265+
"size": 1886003200,
266+
"swap": 1302528
266267
},
267268
"num_threads": 9,
268269
"state": "sleeping"
@@ -271,4 +272,4 @@
271272
"user": {
272273
"name": "alexk"
273274
}
274-
}
275+
}

metricbeat/module/system/process/_meta/fields.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@
111111
format: bytes
112112
description: >
113113
The shared memory the process uses.
114+
- name: swap
115+
type: long
116+
format: bytes
117+
version:
118+
ga: 8.19.11
119+
description: >
120+
The swap memory used by the process (supported only on Linux kernel version 2.6.34+).
114121
- name: io
115122
type: group
116123
description: Disk I/O Metrics, as forwarded from /proc/[PID]/io. Available on Linux only.

0 commit comments

Comments
 (0)