Skip to content

Commit 133be89

Browse files
stefans-elasticcolleenmcginnis
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)
1 parent bdae214 commit 133be89

6 files changed

Lines changed: 66 additions & 4 deletions

File tree

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
@@ -1048,6 +1048,14 @@ Memory-specific statistics per process.
10481048
format: bytes
10491049

10501050

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

10531061
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
@@ -396,7 +396,8 @@ Here is an example document generated by this metricset:
396396
"pct": 0.0008
397397
},
398398
"share": 16252928,
399-
"size": 1886003200
399+
"size": 1886003200,
400+
"swap": 1302528
400401
},
401402
"num_threads": 9,
402403
"state": "sleeping"

metricbeat/module/system/fields.go

Lines changed: 1 addition & 1 deletion
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
@@ -288,7 +288,8 @@
288288
"pct": 0.0008
289289
},
290290
"share": 16252928,
291-
"size": 1886003200
291+
"size": 1886003200,
292+
"swap": 1302528
292293
},
293294
"num_threads": 9,
294295
"state": "sleeping"
@@ -297,4 +298,4 @@
297298
"user": {
298299
"name": "alexk"
299300
}
300-
}
301+
}

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)