[Metricbeat] Bump elastic-agent-system-metrics for zswap and cgroups v2 CPU CFS data#49098
[Metricbeat] Bump elastic-agent-system-metrics for zswap and cgroups v2 CPU CFS data#49098orestisfl merged 25 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsJust comment with:
|
0eecde1 to
9f78d9a
Compare
Vale Linting ResultsSummary: 1 suggestion found 💡 Suggestions (1)
The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
🔍 Preview links for changed docs |
|
/test |
vishaangelova
left a comment
There was a problem hiding this comment.
LGTM, left some small suggestions for your consideration.
|
@orestisfl we should be able to bump Should we backport this PR? Or you planned to address it differently? |
|
Checked workflow run Root cause analysis: there is no failure to diagnose in this run (0 failed jobs, no failing-step logs). Recommended action: no code/workflow fix needed for this run; if you expected a failure, share the specific run/job URL that failed and I can analyze that one directly. Tests run in this investigation:
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Checked workflow run
Recommended action: no code/workflow changes needed for this run. If you want, I can analyze a failing run ID instead and provide a targeted fix plan. What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Key takeaway: workflow run
Recommended action: no remediation needed for this run. Tests run by me: none locally (analysis based on GitHub Actions run/job metadata and failed-job log query). What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Workflow run Summary:
Root cause/fix:
Tests run:
Follow-up:
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
@Mergifyio backport 8.19 9.2 9.3 |
✅ Backports have been createdDetails
Cherry-pick of eeabffa has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
|
…v2 CPU CFS data (#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ``` (cherry picked from commit eeabffa) # Conflicts: # metricbeat/module/system/fields.go
…v2 CPU CFS data (#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ``` (cherry picked from commit eeabffa)
…v2 CPU CFS data (#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ``` (cherry picked from commit eeabffa)
…v2 CPU CFS data (#49098) (#49399) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ``` (cherry picked from commit eeabffa) Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
…v2 CPU CFS data (#49098) (#49400) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ``` (cherry picked from commit eeabffa) Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
…s for zswap and cgroups v2 CPU CFS data (#49398) * [Metricbeat] Bump elastic-agent-system-metrics for zswap and cgroups v2 CPU CFS data (#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ``` (cherry picked from commit eeabffa) # Conflicts: # metricbeat/module/system/fields.go * Resolve cherry-pick conflict by regenerating fields.go The auto-generated metricbeat/module/system/fields.go had merge conflict markers from the backport cherry-pick. Regenerated using `mage fields` based on the successfully merged _meta/fields.yml files. --------- Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
…v2 CPU CFS data (#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ```
…v2 CPU CFS data (elastic#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ```
…v2 CPU CFS data (elastic#49098) Bumps the elastic-agent-system-metrics dependency to [v0.14.3](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.3), [v0.14.2](https://github.com/elastic/elastic-agent-system-metrics/releases/tag/v0.14.2) also included. ### What's Changed * Add Zswap Metrics by @orestisfl in elastic/elastic-agent-system-metrics#279 * PULL_REQUEST_TEMPLATE: Remove reference to non-existant CHANGELOG.md by @orestisfl in elastic/elastic-agent-system-metrics#286 * fix: remove shared context timeout from matrix tests by @orestisfl in elastic/elastic-agent-system-metrics#285 * Enable modernize linter and apply suggestions by @orestisfl in elastic/elastic-agent-system-metrics#287 * Use json omitzero for struct-typed fields in cgroup structs by @orestisfl in elastic/elastic-agent-system-metrics#288 * [cgv2] Add CPU CFS quota, period, and weight metrics by @orestisfl in elastic/elastic-agent-system-metrics#281 * Add missing zswap debug metrics by @orestisfl in elastic/elastic-agent-system-metrics#289 ## Disruptive User Impact None. New features. ## How to test this PR locally 1. Build metricbeat from the branch: ```bash cd metricbeat mage build ``` 2. Create a test config file `metricbeat.test.yml`: ```yaml metricbeat.modules: - module: system period: 5s metricsets: - memory - process process.include_top_n: by_cpu: 5 by_memory: 5 output.console: pretty: true logging.level: debug ``` 3. Run metricbeat: ```bash ./metricbeat -e -c metricbeat.test.yml ``` 4. Verify zswap memory metrics appear in the output (requires Linux with zswap enabled -- check with `cat /sys/module/zswap/parameters/enabled`): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "memory") | .system.memory.zswap' ``` Expected output (values will vary): ```json { "compressed": 950353920, "uncompressed": 3813502976 } ``` 5. To also verify the `zswap.debug.*` fields (requires debugfs access), grant the binary the `cap_dac_read_search` capability: ```bash sudo setcap cap_dac_read_search=+ep metricbeat ``` Then re-run. Expected output with debug fields: ```json { "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } } ``` 6. Verify `cfs.weight` appears in process cgroup metrics (requires cgroupsv2): ```bash ./metricbeat -e -c metricbeat.test.yml 2>/dev/null | jq 'select(.metricset.name == "process") | .system.process.cgroup.cpu.cfs.weight // empty' ``` 7. Run unit tests: ```bash cd metricbeat go test ./module/system/... ```
Proposed commit message
Bumps the elastic-agent-system-metrics dependency to v0.14.3, v0.14.2 also included.
What's Changed
Checklist
I have made corresponding change to the default configuration filesstresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
None. New features.
How to test this PR locally
cd metricbeat mage buildmetricbeat.test.yml:cat /sys/module/zswap/parameters/enabled):Expected output (values will vary):
{ "compressed": 950353920, "uncompressed": 3813502976 }zswap.debug.*fields (requires debugfs access), grant the binary thecap_dac_read_searchcapability:Then re-run. Expected output with debug fields:
{ "compressed": 950353920, "uncompressed": 3813502976, "debug": { "decompress_fail": 0, "pool_limit_hit": 0, "pool_total_size": 950353920, "reject_alloc_fail": 0, "reject_compress_fail": 0, "reject_compress_poor": 0, "reject_kmemcache_fail": 0, "reject_reclaim_fail": 0, "stored_incompressible_pages": 16779, "stored_pages": 931031, "written_back_pages": 29111 } }cfs.weightappears in process cgroup metrics (requires cgroupsv2):Related issues
system.processdataset should support cgroupv2 CPU metrics #47708