forked from microsoft/retina
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove inactive connections' IP addresses from tcp_connection_re…
…mote metric (microsoft#388) # Description closes microsoft#382 ![image](https://github.com/microsoft/retina/assets/28567936/778c7c56-b6ba-4ee6-b772-28a46fe1e813) ![image](https://github.com/microsoft/retina/assets/28567936/29095ff2-d1db-4316-9857-a25b22b7fc36) ## Related Issue If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request. ## Checklist - [ ] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [ ] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [ ] I have correctly attributed the author(s) of the code. - [ ] I have tested the changes locally. - [ ] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [ ] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project.
- Loading branch information
Showing
4 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,10 @@ const ( | |
|
||
//go:generate go run go.uber.org/mock/[email protected] -source=types_linux.go -destination=linuxutil_mock_generated.go -package=linuxutil | ||
type linuxUtil struct { | ||
cfg *kcfg.Config | ||
l *log.ZapLogger | ||
isRunning bool | ||
cfg *kcfg.Config | ||
l *log.ZapLogger | ||
isRunning bool | ||
prevTCPSockStats *SocketStats | ||
} | ||
|
||
var netstatCuratedKeys = map[string]struct{}{ | ||
|
@@ -85,6 +86,9 @@ type NetstatOpts struct { | |
|
||
// get only listening sockets | ||
ListenSock bool | ||
|
||
// previous TCP socket stats | ||
PrevTCPSockStats *SocketStats | ||
} | ||
|
||
type EthtoolStats struct { | ||
|