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

Add per-process network data to system/process #37121

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Nov 14, 2023

Proposed commit message

Addresses part of #7461 by adding a series of fields that report network usage in bytes for a process.

This ended up being a tad more complex than I had first thought, as there's two moving pieces.

  • A component that needs to operate in its own thread, listening to incoming packets and recording byte counts
  • A watcher component needs to operate independently monitoring /proc/net/tcp and proc/net/udp to monitor for network connections, then match the connection tuple to an inode, which can then be mapped to a process.

The latter part is accomplished by using packetbeat's ProcessWatcher component.

Getting this to work as-is has required a few tradeoffs:

  • Using libpcap would introduce an other runtime dependency into metricbeat, so this uses AF_PACKET, which is linux-only. I'm not sure if there's a "clever" way to swap between the two, as the libpcap dependency is introduced when the package is imported.
  • ProcessWatcher does not implement ICMP, meaning we're not tracking byte counts for any ICMP network traffic, just TCP and UDP
  • Because this requires multiple parallel components to collect data at different times, there's always a possibility that short-lived processes don't get recorded. This is a problem with system/process in general, although it occurs here as well.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  • pull down and build, set the track_network_data flag. Simply check incoming data for network traffic

  • Alternatively, perform a large network operation, for example, download something with wget, and ensure the process is reported with the correct amount of traffic.

  • Relates Metricbeat doesnt give network io and disk io per process  #7461

Performance

I ran two tests with this metricset running under agent, then gathered a CPU profile via agent diagnostics. One test ran while downloading a 20GB file (the wikipedia archive at https://dumps.wikimedia.org/enwiki/20231120/), the other ran with just "ambient" network I/O.

In both cases, the Tracker thread is responsible for around 50% of agent's total CPU time. The majority of this time is spent in syscalls;

(pprof) tree Track
Active filters:
   focus=Track
Showing nodes accounting for 0.56s, 50.91% of 1.10s total
Showing top 80 nodes out of 114
----------------------------------------------------------+-------------
      flat  flat%   sum%        cum   cum%   calls calls% + context
----------------------------------------------------------+-------------
                                             0.16s 69.57% |   os.Readlink
                                             0.05s 21.74% |   internal/poll.ignoringEINTRIO
                                             0.01s  4.35% |   internal/poll.runtime_pollOpen
                                             0.01s  4.35% |   os.openFileNolog
     0.23s 20.91% 20.91%      0.23s 20.91%                | runtime/internal/syscall.Syscall6

This seems to be coming from packetbeat's ProcessWatcher:

Screenshot 2023-11-30 at 1 31 29 PM

The processWatcher should cache results, so I'm a little baffled why this is using so much CPU time. Will continue investigating.

EDIT: The issue has something to do with caching in the ProcessWatcher. The findProc method will attempt to look up a address:port combination, and refresh its own mapping if it can't find it. That refresh is where we're getting hit. However, after some instrumenting, it looks like we're trying to look up the same address:port combination multiple times, which means that the internal map isn't getting updated when it should. Continuing to investigate.

EDIT2: issue here: #37266

@fearful-symmetry fearful-symmetry added the Team:Elastic-Agent Label for the Agent team label Nov 14, 2023
@fearful-symmetry fearful-symmetry self-assigned this Nov 14, 2023
@fearful-symmetry fearful-symmetry requested a review from a team as a code owner November 14, 2023 18:47
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Nov 14, 2023
Copy link
Contributor

mergify bot commented Nov 14, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @fearful-symmetry? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@fearful-symmetry fearful-symmetry changed the title initial commit Add per-process network data to system/process Nov 14, 2023
@fearful-symmetry fearful-symmetry requested a review from a team as a code owner November 14, 2023 18:52
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 14, 2023

💚 Build Succeeded

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-11-14T21:42:20.820+0000

  • Duration: 179 min 25 sec

Test stats 🧪

Test Results
Failed 0
Passed 28192
Skipped 1882
Total 30074

💚 Flaky test report

Tests succeeded.

🤖 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!)

metricbeat/module/system/process/network/tracker.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/tracker.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/tracker.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/tracker.go Outdated Show resolved Hide resolved
Comment on lines 192 to 202
for _, key := range keys {
found, _ := gcPidFetch(ctx, int32(key))
if !found {
keysToDelete = append(keysToDelete, key)
}
}
if len(keysToDelete) > 0 {
track.dataMut.Lock()
for _, key := range keysToDelete {
delete(track.procData, key)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see a possible scenario here when:

  1. The map is locked and copied
  2. We identify a key for a PID that does not exist anymore
  3. Right before the moment when we delete expired keys a new process started with the same re-used PID and it was added to the map overwriting the previous record.
  4. We delete a record for an existing/valid process.

I think we cannot separate locks here because of that. I'm not sure how often a PID re-use happens though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yah. In my experience, PID reuse does happen on some containerized workflows. I'm a bit reluctant to carry the lock through that entire operation, since the gcPidFetch operation will take some amount of time, and can potentially bottleneck things. The worst case here is that the data for the "reused" PID is off by a few bytes, as it will just get re-added the next time it reports data. Still not a great solution, though.

Other idea might be to add some kind of updated tag to the PacketData object, to check if the updated time is newer than the "check" time.

metricbeat/module/system/process/network/tracker.go Outdated Show resolved Hide resolved
Comment on lines 211 to 213
if track.loopWaiter != nil {
track.loopWaiter <- struct{}{}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary for testing? It looks like we have test code in the production code, I'd rather avoid this if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, maybe we can wrap the ticker.C somehow, so we only have one channel that we can put in sort of a stop-start mode for testing...

metricbeat/module/system/process/process.go Show resolved Hide resolved
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

  • Start Time: 2023-11-27T19:07:09.543+0000

  • Duration: 99 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 27750
Skipped 1882
Total 29632

Steps errors 2

Expand to view the steps failures

filebeat-windows-2022-windows-2022 - mage build unitTest
  • Took 9 min 38 sec . View more details here
  • Description: mage build unitTest
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'org.jenkinsci.plugins.workflow.steps.FlowInterruptedException'

🤖 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!)

Incoming network counters


*`system.process.network.incoming.tcp`*::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be using the best matching field from ECS for new fields.

In this case I would follow https://www.elastic.co/guide/en/ecs/current/ecs-network.html#field-network-direction

if err != nil {
return nil, fmt.Errorf("error creating network tracker: %w", err)
}
err = m.networkMonitoring.Track(context.Background())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is context.Background correct? Is the only way for this to be cancelled the process exiting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I added a Close() implementation to the metricset, but since the reporter interface doesn't give us any kind of parent context, not sure what use we would get from our own.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should there be two ways to stop the Tracker? It seems a little unclear with the API accepting a context.Context and having a Stop()

And BTW (for another day), adding a Context() context.Context to MetricSet sounds like reasonable thing to do.

@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: 130 min 21 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

💔 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-11-27T23:37:29.738+0000

  • Duration: 130 min 45 sec

Test stats 🧪

Test Results
Failed 6
Passed 25558
Skipped 1304
Total 26868

Test errors 6

Expand to view the tests failures

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f577be2a690>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f577dda3e50>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f577c0fb910>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fcc881c7e20>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fcc88233cd0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fcc85bb1ae0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

Steps errors 22

Expand to view the steps failures

Show only the first 10 steps failures

metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 1 min 53 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 25 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 26 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 26 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 17 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 17 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 22 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 18 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 18 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-pythonIntegTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_metricbeat – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_unix – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process_metricbeat – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / 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!)

@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-11-28T18:56:47.778+0000

  • Duration: 129 min 58 sec

Test stats 🧪

Test Results
Failed 6
Passed 25558
Skipped 1304
Total 26868

Test errors 6

Expand to view the tests failures

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f7872d26150>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f7876064710>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f78753991d0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f8b97a57790>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f8b97bc7ee0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f8b95beb5b0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

Steps errors 22

Expand to view the steps failures

Show only the first 10 steps failures

metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 2 min 28 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 25 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 26 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 4 min 52 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 18 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 18 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 4 min 33 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 17 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 17 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-pythonIntegTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_metricbeat – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_unix – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process_metricbeat – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / 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!)

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These messages coming out of the Packetbeat watcher are going to be very noisy. We should probably modify that code to be less noisy. Any short-lived process like curl is going to cause this message.

{"log.level":"info","@timestamp":"2023-11-28T16:21:31.921-0500","log.origin":{"file.name":"procs/procs_linux.go","file.line":100},"message":"FindSocketsOfPid: open /proc/11118/fd: no such file or directory","ecs.version":"1.6.0"}

I think you would also get this message for any process that has its own network namespace, which is going to be most containers.

metricbeat/module/system/process/process.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/process.go Outdated Show resolved Hide resolved
if err != nil {
return nil, fmt.Errorf("error creating network tracker: %w", err)
}
err = m.networkMonitoring.Track(context.Background())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should there be two ways to stop the Tracker? It seems a little unclear with the API accepting a context.Context and having a Stop()

And BTW (for another day), adding a Context() context.Context to MetricSet sounds like reasonable thing to do.

metricbeat/module/system/process/network/network_proto.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/network_proto.go Outdated Show resolved Hide resolved
// specific language governing permissions and limitations
// under the License.

//go:build integration_dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this isn't a tag that we ever run on CI. Perhaps this file was not meant to be committed? The 10 minute sleep is another indicator that perhaps this was just for your local testing purposes.

metricbeat/module/system/process/network/tracker_types.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/tracker_types.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/tracker_types.go Outdated Show resolved Hide resolved
metricbeat/module/system/process/network/tracker_types.go Outdated Show resolved Hide resolved
@fearful-symmetry
Copy link
Contributor Author

@andrewkroh regarding the messages coming from packetbeat's process watcher---should we block this PR on a change to make that less noisy?

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

  • Start Time: 2023-11-28T21:18:45.183+0000

  • Duration: 68 min 17 sec

Test stats 🧪

Test Results
Failed 6
Passed 25124
Skipped 1304
Total 26434

Test errors 6

Expand to view the tests failures

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f7451577810>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f745153bc10>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f744ff7a8d0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fabd143dcc0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fabcea740d0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fabd1451720>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

Steps errors 22

Expand to view the steps failures

Show only the first 10 steps failures

metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 2 min 27 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 25 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 25 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 3 min 29 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 17 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 0 min 17 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 4 min 43 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 19 sec . View more details here
  • Description: mage build unitTest
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 0 min 19 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'

🤖 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!)

@andrewkroh
Copy link
Member

I think you could take that up in a separate PR.

You should consider documenting the limitations of this to prevent surprised users. Like document the visibility limitations relating to short-lived processes and network namespaces (this one I'm assuming so do verify).

@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: 131 min 42 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!)

Copy link
Contributor

mergify bot commented Dec 1, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b process-network-counters upstream/process-network-counters
git merge upstream/main
git push upstream process-network-counters

@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-01T21:46:58.486+0000

  • Duration: 129 min 45 sec

Test stats 🧪

Test Results
Failed 6
Passed 28088
Skipped 1442
Total 29536

Test errors 6

Expand to view the tests failures

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f4beb39ba10>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f4beacfc610>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7f4be8df0f10>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:416: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fc421d403d0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    Expand to view the stacktrace

     self = <test_system.Test testMethod=test_process_metricbeat>
    
        @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os")
        def test_process_metricbeat(self):
            """
            Checks that the per proc stats are found in the output and
            have the expected types.
            """
            self.render_config_template(modules=[{
                "name": "system",
                "metricsets": ["process"],
                "period": "5s",
                "processes": ["(?i)metricbeat.test"]
            }])
        
            mb_handle = self.start_beat()
            self.wait_until(lambda: self.output_count(lambda x: x >= 1))
    >       mb_handle.check_kill_and_wait()
    
    module/system/test_system.py:521: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fc41f37f1f0>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

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

     AssertionError: Expected exit code to be 0, but it was 2 
    

    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()
    
    module/system/test_system.py:472: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    tests/system/metricbeat.py:108: in run_beat_and_stop
        proc.check_kill_and_wait()
    ../libbeat/tests/system/beat/beat.py:153: in check_kill_and_wait
        return self.check_wait(exit_code=exit_code)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <beat.beat.Proc object at 0x7fc421d80e80>, exit_code = 0
    
        def check_wait(self, exit_code=0):
            """
            check_wait waits for the process to exit, and checks the return code of the process
            """
            actual_exit_code = self.wait()
    >       assert actual_exit_code == exit_code, f"Expected exit code to be {exit_code}, but it was {actual_exit_code}"
    E       AssertionError: Expected exit code to be 0, but it was 2
    
    ../libbeat/tests/system/beat/beat.py:133: AssertionError 
    

Steps errors 14

Expand to view the steps failures

Show only the first 10 steps failures

metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 7 min 41 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 2 min 3 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 2 min 9 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 6 min 4 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 2 min 59 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 2 min 1 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 6 min 32 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 2 min 51 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 2 min 53 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-pythonIntegTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_metricbeat – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_process_unix – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / test_process_metricbeat – metricbeat.module.system.test_system.Test
  • Name: Build&Test / metricbeat-unitTest / 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!)

@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: 128 min 23 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!)

@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: 107 min 1 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!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

  • Start Time: 2023-12-08T22:17:16.265+0000

  • Duration: 128 min 16 sec

Test stats 🧪

Test Results
Failed 0
Passed 24225
Skipped 1634
Total 25859

🤖 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 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: 129 min 34 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 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-11T23:43:50.897+0000

  • Duration: 128 min 25 sec

Test stats 🧪

Test Results
Failed 0
Passed 28120
Skipped 1442
Total 29562

Steps errors 8

Expand to view the steps failures

metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 5 min 19 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 2 min 49 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2022-windows-2022 - mage build unitTest
  • Took 2 min 59 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 5 min 13 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 2 min 46 sec . View more details here
  • Description: mage build unitTest
metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 2 min 46 sec . View more details here
  • Description: mage build unitTest
x-pack/filebeat-windows-2022-windows-2022 - mage build unitTest
  • Took 7 min 2 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

Tests succeeded.

🤖 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!)

@fearful-symmetry fearful-symmetry marked this pull request as draft December 12, 2023 17:04
Copy link
Contributor

mergify bot commented Feb 5, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @fearful-symmetry? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Dec 26, 2024

backport-8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Dec 26, 2024
Copy link
Contributor

mergify bot commented Dec 26, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b process-network-counters upstream/process-network-counters
git merge upstream/main
git push upstream process-network-counters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants