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

eBPF socket function #15850

Merged
merged 204 commits into from Sep 14, 2023
Merged

eBPF socket function #15850

merged 204 commits into from Sep 14, 2023

Conversation

thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Aug 21, 2023

Summary

This PR is adding another function for eBPF.plugin, this time we are also delivering for users the capability to monitor sockets opened per PID.

Test Plan
  1. Compile this branch and run netdata.
  2. Access few websites and run this script .
sh tests.sh "https://192.168.1.15:19999"
  1. You should not get any error.
Additional Information

This PR was tested on :

Linux Distribution Hardware/VM Kernel version output
Slackware Linux Bare metal 6.1.51 slackware_6_1_51.txt
Arch Linux Libvirt 6.4.12-arch1-1 arch_6_4_12.txt
Ubuntu 22.04 Libvirt 5.15.0-76-generic ubuntu_5_15.txt
Osório 8.6 Libvirt 5.15.0-104.119.4.2.el8uek.x86_64 oracle_86.txt
Alma 9 Libvirt 5.14.0-284.25.1.el9_2.x86_64 alma_5_14.txt
Debian 11 Libvirt 5.10.0-23-amd64 debian_5_10.txt
Ubuntu 20.04 Libvirt 5.4.0-146-generic ubuntu_5_4.txt
Alma 4.18 Libvirt 4.18 alma_4_18.txt
Slackware Current Qemu 4.14.290 slackware_4_14_290.txt
For users: How does this change affect me? Describe the PR affects users: - Which area of Netdata is affected by the change? ebpf.plugin - Can they see the change or is it an under the hood? If they can see it, where? On cloud we will have another function available. - How is the user impacted by the change? Another tool to take a look in detailed information per socket. - What are there any benefits of the change? A more complete information about sockets.

@thiagoftsm thiagoftsm marked this pull request as draft August 21, 2023 03:38
@github-actions github-actions bot added area/packaging Packaging and operating systems support area/docs area/collectors Everything related to data collection collectors/ebpf labels Aug 21, 2023
@thiagoftsm thiagoftsm force-pushed the ebpf_socket_function branch 6 times, most recently from 7e1e110 to a12dc5b Compare August 27, 2023 13:18
@thiagoftsm thiagoftsm marked this pull request as ready for review August 28, 2023 02:42
Copy link
Member

@Ancairon Ancairon left a comment

Choose a reason for hiding this comment

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

very small wording addition

collectors/ebpf.plugin/README.md Outdated Show resolved Hide resolved
@MrZammler
Copy link
Contributor

Hi Thiago.

I'm running the PR on a VM, and I'm trying to check the data. The test script appears to run without errors.

However, running the endpoint http://10.10.12.101:19999/api/v1/function?function=ebpf_socket in the data section I can only see:

"data":[
        [1986717,"no identifed","127.0.0.1","none","","UNSPEC",0,0,1]],

(The pid is of ebpf plugin)

I started a wget of a 1GB file, I was expecting when I reach the endopoint to see statistics of the download, or am I assuming wrong?

@thiagoftsm
Copy link
Contributor Author

Thank you @MrZammler and @Ancairon for grammar review.

@thiagoftsm
Copy link
Contributor Author

Hi Thiago.

I'm running the PR on a VM, and I'm trying to check the data. The test script appears to run without errors.

However, running the endpoint http://10.10.12.101:19999/api/v1/function?function=ebpf_socket in the data section I can only see:

"data":[
        [1986717,"no identifed","127.0.0.1","none","","UNSPEC",0,0,1]],

(The pid is of ebpf plugin)

I started a wget of a 1GB file, I was expecting when I reach the endopoint to see statistics of the download, or am I assuming wrong?

The script I gave is not resetting everything 🤦 . I will add an option to reset in next commits. Good catch.

Best regards!

@thiagoftsm
Copy link
Contributor Author

I am setting this PR again as draft while I am finishing the requests I had during demo section

MrZammler
MrZammler previously approved these changes Sep 13, 2023
Copy link
Contributor

@MrZammler MrZammler left a comment

Choose a reason for hiding this comment

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

Nice work Thiago!

@thiagoftsm thiagoftsm merged commit 8fbb89b into netdata:master Sep 14, 2023
138 checks passed
@thiagoftsm thiagoftsm deleted the ebpf_socket_function branch September 14, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection area/docs area/packaging Packaging and operating systems support collectors/ebpf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants