-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.procstat): Add ability to collect per-process socket statistics #15423
Conversation
b9f89e0
to
475d573
Compare
Have a few issues from a quick test I just did. My test involved specifying a single PID of an openvpn client. A subset of the output is below which I'll refer to when describing the issues. Config:
|
@phemmer thanks for testing! Let me answer your comments:
I'm reading
This is the raw "name" as delivered by the syscall. I can try to clean this up or simply only use the "src"!? I guess the truncated strings are due to the strange chars at the end...
Will fix.
So probably we should use the
I agree, what do you think should be "tagable"? Maybe |
for normal IP, to be uniquely identifiable, you need source addr, source port, destination addr, & destination port. For unix sockets it's a bit more messy as you can have multiple connections with the same source and destination. For that you have to include inode as well. Edit: Oh, I might also go with "name" for unix sockets, not "src". Leave "src" for IP sockets. |
1ec628a
to
a3f0ff8
Compare
@phemmer I think my latest commits address all your point!? Looking forward to your test-results and comments! |
Seems to work fine. I've only done some light testing, but it appears to work and the functionality seems reasonable. Sockets without a name show up as |
I agree to your assessment. Would it be helpful to provide the inode in the |
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you! |
After talking to the team, we decided to go with my suggestion and use the |
ec84093
to
6c6b618
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Summary
This PR allows to collect socket statistics per process when specifying
sockets
in theproperties
setting. Furthermore, the PR adds ansocket_protocols
option to select only a subset of socket-types to collect.Checklist
Related issues
resolves #3436