Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.11](backport #37292) build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.9.0 to 0.9.1 #37353

Closed
wants to merge 3 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 7, 2023

This is an automatic backport of pull request #37292 done by Mergify.
Cherry-pick of 89e4737 has failed:

On branch mergify/bp/8.11/pr-37292
Your branch is up to date with 'origin/8.11'.

You are currently cherry-picking commit 89e4737d1b.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   NOTICE.txt
	both modified:   go.mod
	both modified:   go.sum

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…m 0.9.0 to 0.9.1 (#37292)

* build(deps): bump github.com/elastic/elastic-agent-system-metrics

Bumps [github.com/elastic/elastic-agent-system-metrics](https://github.com/elastic/elastic-agent-system-metrics) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/elastic/elastic-agent-system-metrics/releases)
- [Changelog](https://github.com/elastic/elastic-agent-system-metrics/blob/main/CHANGELOG.md)
- [Commits](elastic/elastic-agent-system-metrics@v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: github.com/elastic/elastic-agent-system-metrics
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update NOTICE.txt

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 89e4737)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum
@mergify mergify bot requested a review from a team as a code owner December 7, 2023 21:10
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Dec 7, 2023
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 7, 2023
@elasticmachine
Copy link
Collaborator

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Duration: 6 min 27 sec

Pipeline error 1

This error is likely related to the pipeline itself. Click here
and then you will see the error (either incorrect syntax or an invalid configuration).

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Duration: 7 min 33 sec

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@cmacknz cmacknz enabled auto-merge (squash) December 7, 2023 22:13
@elasticmachine
Copy link
Collaborator

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-12-07T21:36:00.510+0000

  • Duration: 104 min 10 sec

Test stats 🧪

Test Results
Failed 6
Passed 28453
Skipped 2013
Total 30472

Test errors 6

Expand to view the tests failures

Build&Test / metricbeat-unitTest / test_process – metricbeat.module.system.test_system.Test
    Expand to view the error details

     Exception: Key 'system.process.io.read_bytes' found in event ({'@timestamp': '2023-12-07T22:13:37.649Z', 'metricset': {'name': 'process', 'period': 5000}, 'process': {'working_directory': '/etc/sv/jenkins-swarm/log', 'parent': {'pid': 1244}, 'pgid': 1244, 'state': 'sleeping', 'cpu': {'start_time': '2023-12-07T21:47:30.000Z'}, 'memory': {'pct': 0}, 'pid': 1247, 'name': 'svlogd', 'command_line': 'svlogd ./main', 'executable': '/package/admin/runit-2.1.2/command/svlogd', 'args': ['svlogd', './main']}, 'agent': {'ephemeral_id': 'd145aa08-beb1-4fce-9114-4d66a436b9b3', 'id': 'f8a7fcc8-dcd3-4215-827d-77a438d4d07f', 'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125', 'type': 'metricbeat', 'version': '8.11.3'}, 'user': {'name': 'jenkins'}, 'event': {'dataset': 'system.process', 'module': 'system', 'duration': 53133568}, 'service': {'type': 'system'}, 'system': {'process': {'fd': {'limit': {'soft': 1024, 'hard': 524288}, 'open': 7}, 'state': 'sleeping', 'memory': {'size': 2871296, 'share': 1179648, 'rss': {'bytes': 1179648, 'pct': 0}}, 'cmdline': 'svlogd ./main', 'cgroup': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'cpu': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'pressure': {'some': {'10': {'pct': 0.05}, '60': {'pct': 6.1}, '300': {'pct': 10.91}, 'total': 156705388}, 'full': {'10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0}, 'total': 4592637}}, 'stats': {'system': {'ns': 578607950}, 'throttled': {'us': 0, 'periods': 0}, 'periods': 0, 'usage': {'ns': 4041553879}, 'user': {'ns': 3462945928}}}, 'memory': {'mem': {'events': {'oom_kill': 0, 'low': 0, 'high': 0, 'max': 0, 'oom': 0}, 'usage': {'bytes': 11787886592}, 'low': {'bytes': 0}}, 'memsw': {'events': {'high': 0, 'max': 0, 'fail': 0}, 'usage': {'bytes': 0}, 'low': {'bytes': 0}}, 'stats': {'workingset_refault_anon': 0, 'slab_reclaimable': {'bytes': 584948304}, 'page_lazy_freed': 0, 'file_writeback': {'bytes': 0}, 'workingset_refault_file': 0, 'slab': {'bytes': 588112464}, 'htp_collapse_alloc': 227, 'inactive_file': {'bytes': 6679068672}, 'page_faults': 81080831, 'anon_thp': {'bytes': 2097152}, 'workingset_restore_file': 0, 'page_lazy_free': 8336, 'workingset_node_reclaim': 0, 'thp_fault_alloc': 6010, 'workingset_activate_anon': 0, 'page_activate': 8861517, 'file': {'bytes': 10344267776}, 'active_anon': {'bytes': 122880}, 'per_cpu': {'bytes': 5640}, 'kernel_stack': {'bytes': 2752512}, 'unevictable': {'bytes': 0}, 'page_deactivate': 0, 'file_mapped': {'bytes': 444186624}, 'workingset_restore_anon': 0, 'major_page_faults': 39002, 'sock': {'bytes': 4096}, 'swap_cached': {'bytes': 0}, 'anon': {'bytes': 845910016}, 'page_tables': {'bytes': 5443584}, 'shmem': {'bytes': 0}, 'shmem_thp': {'bytes': 0}, 'inactive_anon': {'bytes': 815419392}, 'page_steal': 0, 'active_file': {'bytes': 3695386624}, 'slab_unreclaimable': {'bytes': 3164160}, 'file_thp': {'bytes': 0}, 'page_refill': 0, 'file_dirty': {'bytes': 47067136}, 'workingset_activate_file': 0, 'page_scan': 0}, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service'}, 'io': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'stats': {'sda': {'read': {'bytes': 3559218176, 'ios': 103188}, 'write': {'bytes': 11139608576, 'ios': 720335}, 'discarded': {'ios': 0, 'bytes': 0}}}, 'pressure': {'full': {'300': {'pct': 0.04}, 'total': 16210048, '10': {'pct': 0}, '60': {'pct': 0}}, 'some': {'10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0.04}, 'total': 16380224}}}, 'cgroups_version': 2}, 'cpu': {'system': {'ticks': 0}, 'start_time': '2023-12-07T21:47:30.000Z', 'total': {'ticks': 0, 'value': 0}, 'user': {'ticks': 0}}, 'num_threads': 1, 'io': {'read_bytes': 57344, 'write_bytes': 24576, 'cancelled_write_bytes': 0, 'read_char': 35489, 'write_char': 11283, 'read_ops': 83, 'write_ops': 48}}}, 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125'}}) is not documented! 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process(self):
            """
            Test system/process output.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "extras": {
                    "process.env.whitelist": ["PATH"],
                    "process.include_cpu_ticks": True,
        
                    # Remove 'percpu' prior to checking documented fields because its keys are dynamic.
                    "process.include_per_cpu": False,
                }
            }])
            self.run_beat_and_stop()
        
            output = self.read_output_json()
            self.assertGreater(len(output), 0)
        
            found_cmdline = False
            for evt in output:
                process = evt["system"]["process"]
                # Not all process will have 'cmdline' due to permission issues,
                # especially on Windows. Therefore we ensure at least some of
                # them will have it.
                found_cmdline |= "cmdline" in process
        
                # Remove 'env' prior to checking documented fields because its keys are dynamic.
                process.pop("env", None)
    >           self.assert_fields_are_documented(evt)
    
    module/system/test_system.py:430: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_system.Test testMethod=test_process>
    evt = {'@timestamp': '2023-12-07T22:13:37.649Z', 'agent': {'ephemeral_id': 'd145aa08-beb1-4fce-9114-4d66a436b9b3', 'id': 'f8....}, 'ecs': {'version': '8.0.0'}, 'event': {'dataset': 'system.process', 'duration': 53133568, 'module': 'system'}, ...}
    
        def assert_fields_are_documented(self, evt):
            """
            Assert that all keys present in evt are documented in fields.yml.
            This reads from the global fields.yml, means `mage fields` has to be run before the check.
            """
            expected_fields, dict_fields, aliases = self.load_fields()
            flat = self.flatten_object(evt, dict_fields)
        
            def field_pattern_match(pattern, key):
                pattern_fields = pattern.split(".")
                key_fields = key.split(".")
                if len(pattern_fields) != len(key_fields):
                    return False
                for i in range(len(pattern_fields)):
                    if pattern_fields[i] == "*":
                        continue
                    if pattern_fields[i] != key_fields[i]:
                        return False
                return True
        
            def is_documented(key, docs):
                if key in docs:
                    return True
                for pattern in (f for f in docs if "*" in f):
                    if field_pattern_match(pattern, key):
                        return True
                return False
        
            for key in flat.keys():
                meta_key = key.startswith('@metadata.')
                # Range keys as used in 'date_range' etc will not have docs of course
                is_range_key = key.split('.')[-1] in ['gte', 'gt', 'lte', 'lt']
                if not(is_documented(key, expected_fields) or meta_key or is_range_key):
    >               raise Exception(
                        f"Key '{key}' found in event ({str(evt)}) is not documented!")
    E               Exception: Key 'system.process.io.read_bytes' found in event ({'@timestamp': '2023-12-07T22:13:37.649Z', 'metricset': {'name': 'process', 'period': 5000}, 'process': {'working_directory': '/etc/sv/jenkins-swarm/log', 'parent': {'pid': 1244}, 'pgid': 1244, 'state': 'sleeping', 'cpu': {'start_time': '2023-12-07T21:47:30.000Z'}, 'memory': {'pct': 0}, 'pid': 1247, 'name': 'svlogd', 'command_line': 'svlogd ./main', 'executable': '/package/admin/runit-2.1.2/command/svlogd', 'args': ['svlogd', './main']}, 'agent': {'ephemeral_id': 'd145aa08-beb1-4fce-9114-4d66a436b9b3', 'id': 'f8a7fcc8-dcd3-4215-827d-77a438d4d07f', 'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125', 'type': 'metricbeat', 'version': '8.11.3'}, 'user': {'name': 'jenkins'}, 'event': {'dataset': 'system.process', 'module': 'system', 'duration': 53133568}, 'service': {'type': 'system'}, 'system': {'process': {'fd': {'limit': {'soft': 1024, 'hard': 524288}, 'open': 7}, 'state': 'sleeping', 'memory': {'size': 2871296, 'share': 1179648, 'rss': {'bytes': 1179648, 'pct': 0}}, 'cmdline': 'svlogd ./main', 'cgroup': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'cpu': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'pressure': {'some': {'10': {'pct': 0.05}, '60': {'pct': 6.1}, '300': {'pct': 10.91}, 'total': 156705388}, 'full': {'10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0}, 'total': 4592637}}, 'stats': {'system': {'ns': 578607950}, 'throttled': {'us': 0, 'periods': 0}, 'periods': 0, 'usage': {'ns': 4041553879}, 'user': {'ns': 3462945928}}}, 'memory': {'mem': {'events': {'oom_kill': 0, 'low': 0, 'high': 0, 'max': 0, 'oom': 0}, 'usage': {'bytes': 11787886592}, 'low': {'bytes': 0}}, 'memsw': {'events': {'high': 0, 'max': 0, 'fail': 0}, 'usage': {'bytes': 0}, 'low': {'bytes': 0}}, 'stats': {'workingset_refault_anon': 0, 'slab_reclaimable': {'bytes': 584948304}, 'page_lazy_freed': 0, 'file_writeback': {'bytes': 0}, 'workingset_refault_file': 0, 'slab': {'bytes': 588112464}, 'htp_collapse_alloc': 227, 'inactive_file': {'bytes': 6679068672}, 'page_faults': 81080831, 'anon_thp': {'bytes': 2097152}, 'workingset_restore_file': 0, 'page_lazy_free': 8336, 'workingset_node_reclaim': 0, 'thp_fault_alloc': 6010, 'workingset_activate_anon': 0, 'page_activate': 8861517, 'file': {'bytes': 10344267776}, 'active_anon': {'bytes': 122880}, 'per_cpu': {'bytes': 5640}, 'kernel_stack': {'bytes': 2752512}, 'unevictable': {'bytes': 0}, 'page_deactivate': 0, 'file_mapped': {'bytes': 444186624}, 'workingset_restore_anon': 0, 'major_page_faults': 39002, 'sock': {'bytes': 4096}, 'swap_cached': {'bytes': 0}, 'anon': {'bytes': 845910016}, 'page_tables': {'bytes': 5443584}, 'shmem': {'bytes': 0}, 'shmem_thp': {'bytes': 0}, 'inactive_anon': {'bytes': 815419392}, 'page_steal': 0, 'active_file': {'bytes': 3695386624}, 'slab_unreclaimable': {'bytes': 3164160}, 'file_thp': {'bytes': 0}, 'page_refill': 0, 'file_dirty': {'bytes': 47067136}, 'workingset_activate_file': 0, 'page_scan': 0}, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service'}, 'io': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'stats': {'sda': {'read': {'bytes': 3559218176, 'ios': 103188}, 'write': {'bytes': 11139608576, 'ios': 720335}, 'discarded': {'ios': 0, 'bytes': 0}}}, 'pressure': {'full': {'300': {'pct': 0.04}, 'total': 16210048, '10': {'pct': 0}, '60': {'pct': 0}}, 'some': {'10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0.04}, 'total': 16380224}}}, 'cgroups_version': 2}, 'cpu': {'system': {'ticks': 0}, 'start_time': '2023-12-07T21:47:30.000Z', 'total': {'ticks': 0, 'value': 0}, 'user': {'ticks': 0}}, 'num_threads': 1, 'io': {'read_bytes': 57344, 'write_bytes': 24576, 'cancelled_write_bytes': 0, 'read_char': 35489, 'write_char': 11283, 'read_ops': 83, 'write_ops': 48}}}, 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125'}}) is not documented!
    
    ../libbeat/tests/system/beat/beat.py:822: Exception 
    

Build&Test / metricbeat-unitTest / test_process_unix – metricbeat.module.system.test_system.Test
    Expand to view the error details

     Exception: Key 'system.process.io.read_char' found in event ({'@timestamp': '2023-12-07T22:13:39.893Z', 'user': {'name': 'jenkins'}, 'service': {'type': 'system'}, 'system': {'process': {'cgroup': {'cpu': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'pressure': {'some': {'10': {'pct': 0.04}, '60': {'pct': 5.9}, '300': {'pct': 10.83}, 'total': 156710755}, 'full': {'300': {'pct': 0}, 'total': 4596804, '10': {'pct': 0}, '60': {'pct': 0}}}, 'stats': {'throttled': {'us': 0, 'periods': 0}, 'periods': 0, 'usage': {'ns': 4044048558}, 'user': {'ns': 3465071009}, 'system': {'ns': 578977548}}}, 'memory': {'memsw': {'events': {'fail': 0, 'high': 0, 'max': 0}, 'usage': {'bytes': 0}, 'low': {'bytes': 0}}, 'stats': {'page_activate': 8861536, 'anon': {'bytes': 845697024}, 'anon_thp': {'bytes': 2097152}, 'inactive_file': {'bytes': 6684729344}, 'workingset_restore_file': 0, 'page_scan': 0, 'file_mapped': {'bytes': 445366272}, 'file_dirty': {'bytes': 52523008}, 'inactive_anon': {'bytes': 815304704}, 'active_anon': {'bytes': 122880}, 'kernel_stack': {'bytes': 2752512}, 'per_cpu': {'bytes': 5640}, 'unevictable': {'bytes': 0}, 'file_thp': {'bytes': 0}, 'workingset_activate_file': 0, 'htp_collapse_alloc': 227, 'shmem': {'bytes': 0}, 'thp_fault_alloc': 6010, 'file_writeback': {'bytes': 0}, 'shmem_thp': {'bytes': 0}, 'file': {'bytes': 10349977600}, 'major_page_faults': 39002, 'slab_reclaimable': {'bytes': 585183072}, 'sock': {'bytes': 4096}, 'page_tables': {'bytes': 5439488}, 'page_lazy_free': 8336, 'active_file': {'bytes': 3695452160}, 'slab': {'bytes': 588369480}, 'workingset_node_reclaim': 0, 'workingset_refault_file': 0, 'workingset_refault_anon': 0, 'page_refill': 0, 'page_lazy_freed': 0, 'page_faults': 81119715, 'slab_unreclaimable': {'bytes': 3186408}, 'page_steal': 0, 'page_deactivate': 0, 'swap_cached': {'bytes': 0}, 'workingset_activate_anon': 0, 'workingset_restore_anon': 0}, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'mem': {'low': {'bytes': 0}, 'events': {'low': 0, 'high': 0, 'max': 0, 'oom': 0, 'oom_kill': 0}, 'usage': {'bytes': 11793879040}}}, 'io': {'pressure': {'some': {'10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0.04}, 'total': 16380897}, 'full': {'total': 16210721, '10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0.04}}}, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'stats': {'sda': {'write': {'bytes': 11139932160, 'ios': 720344}, 'discarded': {'bytes': 0, 'ios': 0}, 'read': {'bytes': 3559218176, 'ios': 103188}}}}, 'cgroups_version': 2, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service'}, 'fd': {'open': 7, 'limit': {'soft': 1024, 'hard': 524288}}, 'cpu': {'system': {'ticks': 0}, 'start_time': '2023-12-07T21:47:30.000Z', 'total': {'value': 0, 'ticks': 0}, 'user': {'ticks': 0}}, 'io': {'read_char': 35489, 'write_char': 11283, 'read_ops': 83, 'write_ops': 48, 'read_bytes': 57344, 'write_bytes': 24576, 'cancelled_write_bytes': 0}, 'state': 'sleeping', 'num_threads': 1, 'cmdline': 'svlogd ./main', 'memory': {'share': 1179648, 'rss': {'pct': 0, 'bytes': 1179648}, 'size': 2871296}}}, 'process': {'working_directory': '/etc/sv/jenkins-swarm/log', 'executable': '/package/admin/runit-2.1.2/command/svlogd', 'name': 'svlogd', 'state': 'sleeping', 'memory': {'pct': 0}, 'command_line': 'svlogd ./main', 'parent': {'pid': 1244}, 'pgid': 1244, 'args': ['svlogd', './main'], 'pid': 1247, 'cpu': {'start_time': '2023-12-07T21:47:30.000Z'}}, 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125'}, 'event': {'duration': 53843037, 'dataset': 'system.process', 'module': 'system'}, 'metricset': {'name': 'process', 'period': 5000}, 'agent': {'id': '8e71dab3-7c73-43f5-9252-171fe055bd53', 'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125', 'type': 'metricbeat', 'version': '8.11.3', 'ephemeral_id': '3ddb9b12-b8b9-4eb6-a1e4-2d574b8f5671'}}) is not documented! 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_unix>
    
        @unittest.skipUnless(re.match("(?i)linux|darwin|freebsd", sys.platform), "os")
        def test_process_unix(self):
            """
            Test system/process output checking it has got all expected fields specific of unix systems and no extra ones.
            """
        
            self.render_config_template(
                modules=[{
                    "name": "system",
                    "metricsets": ["process"],
                    "period": "5s",
                    "extras": {
                        "process.env.whitelist": ["PATH"],
                        "process.include_cpu_ticks": True,
        
                        # Remove 'percpu' prior to checking documented fields because its keys are dynamic.
                        "process.include_per_cpu": False,
                    },
                }],
                # Some info is only guaranteed in processes with permissions, check
                # only on own processes.
                processors=[{
                    "drop_event": {
                        "when": "not.equals.user.name: " + getpass.getuser(),
                    },
                }],
            )
            self.run_beat_and_stop()
        
            output = self.read_output_json()
            self.assertGreater(len(output), 0)
        
            found_fd = False
            found_env = False
            found_cwd = not sys.platform.startswith("linux")
            for evt in output:
                found_cwd |= "working_directory" in evt["process"]
        
                process = evt["system"]["process"]
                found_fd |= "fd" in process
                found_env |= "env" in process
        
                # Remove 'env' prior to checking documented fields because its keys are dynamic.
                process.pop("env", None)
    >           self.assert_fields_are_documented(evt)
    
    module/system/test_system.py:488: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_system.Test testMethod=test_process_unix>
    evt = {'@timestamp': '2023-12-07T22:13:39.893Z', 'agent': {'ephemeral_id': '3ddb9b12-b8b9-4eb6-a1e4-2d574b8f5671', 'id': '8e....}, 'ecs': {'version': '8.0.0'}, 'event': {'dataset': 'system.process', 'duration': 53843037, 'module': 'system'}, ...}
    
        def assert_fields_are_documented(self, evt):
            """
            Assert that all keys present in evt are documented in fields.yml.
            This reads from the global fields.yml, means `mage fields` has to be run before the check.
            """
            expected_fields, dict_fields, aliases = self.load_fields()
            flat = self.flatten_object(evt, dict_fields)
        
            def field_pattern_match(pattern, key):
                pattern_fields = pattern.split(".")
                key_fields = key.split(".")
                if len(pattern_fields) != len(key_fields):
                    return False
                for i in range(len(pattern_fields)):
                    if pattern_fields[i] == "*":
                        continue
                    if pattern_fields[i] != key_fields[i]:
                        return False
                return True
        
            def is_documented(key, docs):
                if key in docs:
                    return True
                for pattern in (f for f in docs if "*" in f):
                    if field_pattern_match(pattern, key):
                        return True
                return False
        
            for key in flat.keys():
                meta_key = key.startswith('@metadata.')
                # Range keys as used in 'date_range' etc will not have docs of course
                is_range_key = key.split('.')[-1] in ['gte', 'gt', 'lte', 'lt']
                if not(is_documented(key, expected_fields) or meta_key or is_range_key):
    >               raise Exception(
                        f"Key '{key}' found in event ({str(evt)}) is not documented!")
    E               Exception: Key 'system.process.io.read_char' found in event ({'@timestamp': '2023-12-07T22:13:39.893Z', 'user': {'name': 'jenkins'}, 'service': {'type': 'system'}, 'system': {'process': {'cgroup': {'cpu': {'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'pressure': {'some': {'10': {'pct': 0.04}, '60': {'pct': 5.9}, '300': {'pct': 10.83}, 'total': 156710755}, 'full': {'300': {'pct': 0}, 'total': 4596804, '10': {'pct': 0}, '60': {'pct': 0}}}, 'stats': {'throttled': {'us': 0, 'periods': 0}, 'periods': 0, 'usage': {'ns': 4044048558}, 'user': {'ns': 3465071009}, 'system': {'ns': 578977548}}}, 'memory': {'memsw': {'events': {'fail': 0, 'high': 0, 'max': 0}, 'usage': {'bytes': 0}, 'low': {'bytes': 0}}, 'stats': {'page_activate': 8861536, 'anon': {'bytes': 845697024}, 'anon_thp': {'bytes': 2097152}, 'inactive_file': {'bytes': 6684729344}, 'workingset_restore_file': 0, 'page_scan': 0, 'file_mapped': {'bytes': 445366272}, 'file_dirty': {'bytes': 52523008}, 'inactive_anon': {'bytes': 815304704}, 'active_anon': {'bytes': 122880}, 'kernel_stack': {'bytes': 2752512}, 'per_cpu': {'bytes': 5640}, 'unevictable': {'bytes': 0}, 'file_thp': {'bytes': 0}, 'workingset_activate_file': 0, 'htp_collapse_alloc': 227, 'shmem': {'bytes': 0}, 'thp_fault_alloc': 6010, 'file_writeback': {'bytes': 0}, 'shmem_thp': {'bytes': 0}, 'file': {'bytes': 10349977600}, 'major_page_faults': 39002, 'slab_reclaimable': {'bytes': 585183072}, 'sock': {'bytes': 4096}, 'page_tables': {'bytes': 5439488}, 'page_lazy_free': 8336, 'active_file': {'bytes': 3695452160}, 'slab': {'bytes': 588369480}, 'workingset_node_reclaim': 0, 'workingset_refault_file': 0, 'workingset_refault_anon': 0, 'page_refill': 0, 'page_lazy_freed': 0, 'page_faults': 81119715, 'slab_unreclaimable': {'bytes': 3186408}, 'page_steal': 0, 'page_deactivate': 0, 'swap_cached': {'bytes': 0}, 'workingset_activate_anon': 0, 'workingset_restore_anon': 0}, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'mem': {'low': {'bytes': 0}, 'events': {'low': 0, 'high': 0, 'max': 0, 'oom': 0, 'oom_kill': 0}, 'usage': {'bytes': 11793879040}}}, 'io': {'pressure': {'some': {'10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0.04}, 'total': 16380897}, 'full': {'total': 16210721, '10': {'pct': 0}, '60': {'pct': 0}, '300': {'pct': 0.04}}}, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service', 'stats': {'sda': {'write': {'bytes': 11139932160, 'ios': 720344}, 'discarded': {'bytes': 0, 'ios': 0}, 'read': {'bytes': 3559218176, 'ios': 103188}}}}, 'cgroups_version': 2, 'id': 'runsvdir.service', 'path': '/system.slice/runsvdir.service'}, 'fd': {'open': 7, 'limit': {'soft': 1024, 'hard': 524288}}, 'cpu': {'system': {'ticks': 0}, 'start_time': '2023-12-07T21:47:30.000Z', 'total': {'value': 0, 'ticks': 0}, 'user': {'ticks': 0}}, 'io': {'read_char': 35489, 'write_char': 11283, 'read_ops': 83, 'write_ops': 48, 'read_bytes': 57344, 'write_bytes': 24576, 'cancelled_write_bytes': 0}, 'state': 'sleeping', 'num_threads': 1, 'cmdline': 'svlogd ./main', 'memory': {'share': 1179648, 'rss': {'pct': 0, 'bytes': 1179648}, 'size': 2871296}}}, 'process': {'working_directory': '/etc/sv/jenkins-swarm/log', 'executable': '/package/admin/runit-2.1.2/command/svlogd', 'name': 'svlogd', 'state': 'sleeping', 'memory': {'pct': 0}, 'command_line': 'svlogd ./main', 'parent': {'pid': 1244}, 'pgid': 1244, 'args': ['svlogd', './main'], 'pid': 1247, 'cpu': {'start_time': '2023-12-07T21:47:30.000Z'}}, 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125'}, 'event': {'duration': 53843037, 'dataset': 'system.process', 'module': 'system'}, 'metricset': {'name': 'process', 'period': 5000}, 'agent': {'id': '8e71dab3-7c73-43f5-9252-171fe055bd53', 'name': 'beats-ci-immutable-ubuntu-2204-1701985597082544125', 'type': 'metricbeat', 'version': '8.11.3', 'ephemeral_id': '3ddb9b12-b8b9-4eb6-a1e4-2d574b8f5671'}}) is not documented!
    
    ../libbeat/tests/system/beat/beat.py:822: Exception 
    

Build&Test / metricbeat-windows-2022-windows-2022 / test_process – metricbeat.module.system.test_system.Test
    Expand to view the error details

     AssertionError: Element counts were not equal:
    First has 0, Second has 1:  'io' 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process(self):
            """
            Test system/process output.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "extras": {
                    "process.env.whitelist": ["PATH"],
                    "process.include_cpu_ticks": True,
        
                    # Remove 'percpu' prior to checking documented fields because its keys are dynamic.
                    "process.include_per_cpu": False,
                }
            }])
            self.run_beat_and_stop()
        
            output = self.read_output_json()
            self.assertGreater(len(output), 0)
        
            found_cmdline = False
            for evt in output:
                process = evt["system"]["process"]
                # Not all process will have 'cmdline' due to permission issues,
                # especially on Windows. Therefore we ensure at least some of
                # them will have it.
                found_cmdline |= "cmdline" in process
        
                # Remove 'env' prior to checking documented fields because its keys are dynamic.
                process.pop("env", None)
                self.assert_fields_are_documented(evt)
        
                # Remove optional keys.
                process.pop("cgroup", None)
                process.pop("fd", None)
                process.pop("cmdline", None)
                process.pop("num_threads", None)
        
    >           self.assertCountEqual(SYSTEM_PROCESS_FIELDS, process.keys())
    E           AssertionError: Element counts were not equal:
    E           First has 0, Second has 1:  'io'
    
    module\system\test_system.py:438: AssertionError 
    

Build&Test / metricbeat-windows-2016-windows-2016 / test_process – metricbeat.module.system.test_system.Test
    Expand to view the error details

     AssertionError: Element counts were not equal:
    First has 0, Second has 1:  'io' 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process(self):
            """
            Test system/process output.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "extras": {
                    "process.env.whitelist": ["PATH"],
                    "process.include_cpu_ticks": True,
        
                    # Remove 'percpu' prior to checking documented fields because its keys are dynamic.
                    "process.include_per_cpu": False,
                }
            }])
            self.run_beat_and_stop()
        
            output = self.read_output_json()
            self.assertGreater(len(output), 0)
        
            found_cmdline = False
            for evt in output:
                process = evt["system"]["process"]
                # Not all process will have 'cmdline' due to permission issues,
                # especially on Windows. Therefore we ensure at least some of
                # them will have it.
                found_cmdline |= "cmdline" in process
        
                # Remove 'env' prior to checking documented fields because its keys are dynamic.
                process.pop("env", None)
                self.assert_fields_are_documented(evt)
        
                # Remove optional keys.
                process.pop("cgroup", None)
                process.pop("fd", None)
                process.pop("cmdline", None)
                process.pop("num_threads", None)
        
    >           self.assertCountEqual(SYSTEM_PROCESS_FIELDS, process.keys())
    E           AssertionError: Element counts were not equal:
    E           First has 0, Second has 1:  'io'
    
    module\system\test_system.py:438: AssertionError 
    

Build&Test / metricbeat-pythonIntegTest / test_process – metricbeat.module.system.test_system.Test
    Expand to view the error details

     Exception: Key 'system.process.io.write_char' found in event ({'@timestamp': '2023-12-07T23:16:43.456Z', 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244'}, 'agent': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244', 'type': 'metricbeat', 'version': '8.11.3', 'ephemeral_id': 'e087741b-3a01-4db7-8e1e-623f65fd8721', 'id': 'fcdc1df9-6975-455a-a9b1-63fa14f4b240'}, 'process': {'state': 'sleeping', 'executable': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'parent': {'pid': 0}, 'command_line': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest', 'cpu': {'start_time': '2023-12-07T22:55:36.000Z'}, 'memory': {'pct': 0.0005}, 'args': ['/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'pythonIntegTest'], 'name': 'mage-linux-amd6', 'pid': 1, 'pgid': 1, 'working_directory': '/go/src/github.com/elastic/beats/metricbeat'}, 'user': {'name': 'root'}, 'event': {'module': 'system', 'duration': 2544675, 'dataset': 'system.process'}, 'metricset': {'period': 5000, 'name': 'process'}, 'service': {'type': 'system'}, 'system': {'process': {'num_threads': 10, 'cmdline': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest', 'fd': {'open': 6, 'limit': {'soft': 1048576, 'hard': 1048576}}, 'state': 'sleeping', 'cpu': {'user': {'ticks': 110}, 'system': {'ticks': 30}, 'start_time': '2023-12-07T22:55:36.000Z', 'total': {'value': 140, 'ticks': 140}}, 'io': {'write_char': 1292258718, 'read_ops': 439915, 'write_ops': 79293, 'read_bytes': 344064, 'write_bytes': 1395118080, 'cancelled_write_bytes': 98463744, 'read_char': 1220890291}, 'cgroup': {'path': '/', 'cgroups_version': 2, 'id': '/'}, 'memory': {'size': 769073152, 'share': 23724032, 'rss': {'bytes': 29319168, 'pct': 0.0005}}}}}) is not documented! 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process(self):
            """
            Test system/process output.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "extras": {
                    "process.env.whitelist": ["PATH"],
                    "process.include_cpu_ticks": True,
        
                    # Remove 'percpu' prior to checking documented fields because its keys are dynamic.
                    "process.include_per_cpu": False,
                }
            }])
            self.run_beat_and_stop()
        
            output = self.read_output_json()
            self.assertGreater(len(output), 0)
        
            found_cmdline = False
            for evt in output:
                process = evt["system"]["process"]
                # Not all process will have 'cmdline' due to permission issues,
                # especially on Windows. Therefore we ensure at least some of
                # them will have it.
                found_cmdline |= "cmdline" in process
        
                # Remove 'env' prior to checking documented fields because its keys are dynamic.
                process.pop("env", None)
    >           self.assert_fields_are_documented(evt)
    
    module/system/test_system.py:430: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_system.Test testMethod=test_process>
    evt = {'@timestamp': '2023-12-07T23:16:43.456Z', 'agent': {'ephemeral_id': 'e087741b-3a01-4db7-8e1e-623f65fd8721', 'id': 'fc.....}, 'ecs': {'version': '8.0.0'}, 'event': {'dataset': 'system.process', 'duration': 2544675, 'module': 'system'}, ...}
    
        def assert_fields_are_documented(self, evt):
            """
            Assert that all keys present in evt are documented in fields.yml.
            This reads from the global fields.yml, means `mage fields` has to be run before the check.
            """
            expected_fields, dict_fields, aliases = self.load_fields()
            flat = self.flatten_object(evt, dict_fields)
        
            def field_pattern_match(pattern, key):
                pattern_fields = pattern.split(".")
                key_fields = key.split(".")
                if len(pattern_fields) != len(key_fields):
                    return False
                for i in range(len(pattern_fields)):
                    if pattern_fields[i] == "*":
                        continue
                    if pattern_fields[i] != key_fields[i]:
                        return False
                return True
        
            def is_documented(key, docs):
                if key in docs:
                    return True
                for pattern in (f for f in docs if "*" in f):
                    if field_pattern_match(pattern, key):
                        return True
                return False
        
            for key in flat.keys():
                meta_key = key.startswith('@metadata.')
                # Range keys as used in 'date_range' etc will not have docs of course
                is_range_key = key.split('.')[-1] in ['gte', 'gt', 'lte', 'lt']
                if not(is_documented(key, expected_fields) or meta_key or is_range_key):
    >               raise Exception(
                        f"Key '{key}' found in event ({str(evt)}) is not documented!")
    E               Exception: Key 'system.process.io.write_char' found in event ({'@timestamp': '2023-12-07T23:16:43.456Z', 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244'}, 'agent': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244', 'type': 'metricbeat', 'version': '8.11.3', 'ephemeral_id': 'e087741b-3a01-4db7-8e1e-623f65fd8721', 'id': 'fcdc1df9-6975-455a-a9b1-63fa14f4b240'}, 'process': {'state': 'sleeping', 'executable': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'parent': {'pid': 0}, 'command_line': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest', 'cpu': {'start_time': '2023-12-07T22:55:36.000Z'}, 'memory': {'pct': 0.0005}, 'args': ['/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'pythonIntegTest'], 'name': 'mage-linux-amd6', 'pid': 1, 'pgid': 1, 'working_directory': '/go/src/github.com/elastic/beats/metricbeat'}, 'user': {'name': 'root'}, 'event': {'module': 'system', 'duration': 2544675, 'dataset': 'system.process'}, 'metricset': {'period': 5000, 'name': 'process'}, 'service': {'type': 'system'}, 'system': {'process': {'num_threads': 10, 'cmdline': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest', 'fd': {'open': 6, 'limit': {'soft': 1048576, 'hard': 1048576}}, 'state': 'sleeping', 'cpu': {'user': {'ticks': 110}, 'system': {'ticks': 30}, 'start_time': '2023-12-07T22:55:36.000Z', 'total': {'value': 140, 'ticks': 140}}, 'io': {'write_char': 1292258718, 'read_ops': 439915, 'write_ops': 79293, 'read_bytes': 344064, 'write_bytes': 1395118080, 'cancelled_write_bytes': 98463744, 'read_char': 1220890291}, 'cgroup': {'path': '/', 'cgroups_version': 2, 'id': '/'}, 'memory': {'size': 769073152, 'share': 23724032, 'rss': {'bytes': 29319168, 'pct': 0.0005}}}}}) is not documented!
    
    ../libbeat/tests/system/beat/beat.py:822: Exception 
    

Build&Test / metricbeat-pythonIntegTest / test_process_unix – metricbeat.module.system.test_system.Test
    Expand to view the error details

     Exception: Key 'system.process.io.read_bytes' found in event ({'@timestamp': '2023-12-07T23:16:45.521Z', 'event': {'duration': 2386471, 'dataset': 'system.process', 'module': 'system'}, 'metricset': {'period': 5000, 'name': 'process'}, 'system': {'process': {'fd': {'open': 6, 'limit': {'soft': 1048576, 'hard': 1048576}}, 'io': {'read_bytes': 344064, 'write_bytes': 1395118080, 'cancelled_write_bytes': 98463744, 'read_char': 1220890291, 'write_char': 1292258718, 'read_ops': 439915, 'write_ops': 79293}, 'memory': {'rss': {'pct': 0.0005, 'bytes': 29319168}, 'size': 769073152, 'share': 23724032}, 'cgroup': {'id': '/', 'path': '/', 'cgroups_version': 2}, 'cpu': {'start_time': '2023-12-07T22:55:36.000Z', 'total': {'value': 140, 'ticks': 140}, 'user': {'ticks': 110}, 'system': {'ticks': 30}}, 'state': 'sleeping', 'num_threads': 10, 'cmdline': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest'}}, 'agent': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244', 'type': 'metricbeat', 'version': '8.11.3', 'ephemeral_id': '880f934d-b86a-47f7-9a24-f62c3e452b9d', 'id': '8da6884e-fc5d-4372-a1d2-4047b970f0b7'}, 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244'}, 'process': {'pgid': 1, 'memory': {'pct': 0.0005}, 'executable': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'name': 'mage-linux-amd6', 'parent': {'pid': 0}, 'state': 'sleeping', 'cpu': {'start_time': '2023-12-07T22:55:36.000Z'}, 'pid': 1, 'working_directory': '/go/src/github.com/elastic/beats/metricbeat', 'args': ['/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'pythonIntegTest'], 'command_line': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest'}, 'user': {'name': 'root'}, 'service': {'type': 'system'}}) is not documented! 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_unix>
    
        @unittest.skipUnless(re.match("(?i)linux|darwin|freebsd", sys.platform), "os")
        def test_process_unix(self):
            """
            Test system/process output checking it has got all expected fields specific of unix systems and no extra ones.
            """
        
            self.render_config_template(
                modules=[{
                    "name": "system",
                    "metricsets": ["process"],
                    "period": "5s",
                    "extras": {
                        "process.env.whitelist": ["PATH"],
                        "process.include_cpu_ticks": True,
        
                        # Remove 'percpu' prior to checking documented fields because its keys are dynamic.
                        "process.include_per_cpu": False,
                    },
                }],
                # Some info is only guaranteed in processes with permissions, check
                # only on own processes.
                processors=[{
                    "drop_event": {
                        "when": "not.equals.user.name: " + getpass.getuser(),
                    },
                }],
            )
            self.run_beat_and_stop()
        
            output = self.read_output_json()
            self.assertGreater(len(output), 0)
        
            found_fd = False
            found_env = False
            found_cwd = not sys.platform.startswith("linux")
            for evt in output:
                found_cwd |= "working_directory" in evt["process"]
        
                process = evt["system"]["process"]
                found_fd |= "fd" in process
                found_env |= "env" in process
        
                # Remove 'env' prior to checking documented fields because its keys are dynamic.
                process.pop("env", None)
    >           self.assert_fields_are_documented(evt)
    
    module/system/test_system.py:488: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <test_system.Test testMethod=test_process_unix>
    evt = {'@timestamp': '2023-12-07T23:16:45.521Z', 'agent': {'ephemeral_id': '880f934d-b86a-47f7-9a24-f62c3e452b9d', 'id': '8d.....}, 'ecs': {'version': '8.0.0'}, 'event': {'dataset': 'system.process', 'duration': 2386471, 'module': 'system'}, ...}
    
        def assert_fields_are_documented(self, evt):
            """
            Assert that all keys present in evt are documented in fields.yml.
            This reads from the global fields.yml, means `mage fields` has to be run before the check.
            """
            expected_fields, dict_fields, aliases = self.load_fields()
            flat = self.flatten_object(evt, dict_fields)
        
            def field_pattern_match(pattern, key):
                pattern_fields = pattern.split(".")
                key_fields = key.split(".")
                if len(pattern_fields) != len(key_fields):
                    return False
                for i in range(len(pattern_fields)):
                    if pattern_fields[i] == "*":
                        continue
                    if pattern_fields[i] != key_fields[i]:
                        return False
                return True
        
            def is_documented(key, docs):
                if key in docs:
                    return True
                for pattern in (f for f in docs if "*" in f):
                    if field_pattern_match(pattern, key):
                        return True
                return False
        
            for key in flat.keys():
                meta_key = key.startswith('@metadata.')
                # Range keys as used in 'date_range' etc will not have docs of course
                is_range_key = key.split('.')[-1] in ['gte', 'gt', 'lte', 'lt']
                if not(is_documented(key, expected_fields) or meta_key or is_range_key):
    >               raise Exception(
                        f"Key '{key}' found in event ({str(evt)}) is not documented!")
    E               Exception: Key 'system.process.io.read_bytes' found in event ({'@timestamp': '2023-12-07T23:16:45.521Z', 'event': {'duration': 2386471, 'dataset': 'system.process', 'module': 'system'}, 'metricset': {'period': 5000, 'name': 'process'}, 'system': {'process': {'fd': {'open': 6, 'limit': {'soft': 1048576, 'hard': 1048576}}, 'io': {'read_bytes': 344064, 'write_bytes': 1395118080, 'cancelled_write_bytes': 98463744, 'read_char': 1220890291, 'write_char': 1292258718, 'read_ops': 439915, 'write_ops': 79293}, 'memory': {'rss': {'pct': 0.0005, 'bytes': 29319168}, 'size': 769073152, 'share': 23724032}, 'cgroup': {'id': '/', 'path': '/', 'cgroups_version': 2}, 'cpu': {'start_time': '2023-12-07T22:55:36.000Z', 'total': {'value': 140, 'ticks': 140}, 'user': {'ticks': 110}, 'system': {'ticks': 30}}, 'state': 'sleeping', 'num_threads': 10, 'cmdline': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest'}}, 'agent': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244', 'type': 'metricbeat', 'version': '8.11.3', 'ephemeral_id': '880f934d-b86a-47f7-9a24-f62c3e452b9d', 'id': '8da6884e-fc5d-4372-a1d2-4047b970f0b7'}, 'ecs': {'version': '8.0.0'}, 'host': {'name': 'beats-ci-immutable-ubuntu-2204-1701985597082659244'}, 'process': {'pgid': 1, 'memory': {'pct': 0.0005}, 'executable': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'name': 'mage-linux-amd6', 'parent': {'pid': 0}, 'state': 'sleeping', 'cpu': {'start_time': '2023-12-07T22:55:36.000Z'}, 'pid': 1, 'working_directory': '/go/src/github.com/elastic/beats/metricbeat', 'args': ['/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64', 'pythonIntegTest'], 'command_line': '/go/src/github.com/elastic/beats/metricbeat/build/mage-linux-amd64 pythonIntegTest'}, 'user': {'name': 'root'}, 'service': {'type': 'system'}}) is not documented!
    
    ../libbeat/tests/system/beat/beat.py:822: Exception 
    

Steps errors 13

Expand to view the steps failures

Show only the first 10 steps failures

metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 32 min 19 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 22 min 16 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 23 min 40 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 9 min 40 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 4 min 33 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 4 min 33 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 9 min 38 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 4 min 36 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 4 min 37 sec . View more details here
  • Description: mage build unitTest
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 6

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Build&Test / metricbeat-unitTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process_unix – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-windows-2022-windows-2022 / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-windows-2016-windows-2016 / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_unix – metricbeat.module.system.test_system.Test

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Dec 8, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 8, 2023
@pierrehilbert pierrehilbert requested a review from cmacknz December 8, 2023 07:14
@cmacknz
Copy link
Member

cmacknz commented Dec 8, 2023

This needs #37213 first which is a feature addition we normally wouldn't backport.

@cmacknz cmacknz closed this Dec 8, 2023
auto-merge was automatically disabled December 8, 2023 17:07

Pull request was closed

@cmacknz cmacknz deleted the mergify/bp/8.11/pr-37292 branch December 8, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants