feat(standalone): Create new metrics module that processes flows and update HNS plugin to emit relevant metrics#1859
Closed
BeegiiK wants to merge 1 commit into
Closed
feat(standalone): Create new metrics module that processes flows and update HNS plugin to emit relevant metrics#1859BeegiiK wants to merge 1 commit into
BeegiiK wants to merge 1 commit into
Conversation
7 tasks
| } | ||
|
|
||
| if d.enableStandalone { | ||
| d.processStandaloneFlow(flow) |
Contributor
There was a problem hiding this comment.
We should split standard and standalone metrics module. Each mode should have its own enrichment/metric computation logic.
|
This PR will be closed in 7 days due to inactivity. |
|
Pull request closed due to inactivity. |
|
This PR will be closed in 7 days due to inactivity. |
|
Pull request closed due to inactivity. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is part 2/2 of a POC on enabling Retina to work outside of Kubernetes (ACI) and collect pod level information such as name and namespace by running it as a binary on the host VM.
This PR focuses on reading the flows for each corresponding metric via the metric module and updating the HNS plugin so that these metrics are updated accordingly
The DNS, drops, forward, TCP flags metrics were updated and the HNS and TCP connections metrics were added (advanced). In these metrics, were reading the flows extensions field which contains the HNS metadata. The protobuf messages were updated (needed to update linux
.protofile aswell since the messages couldn't be recognized inflow_utils.go. This followsRetinaMetadataquite closely. We then expose theGetHNSMetadata()so that when the metric module's process flow is invoked for each metric, the relevant info can be extractedThe metric module reads flows from our updated enricher and updates the required standalone metrics. These flows will be enriched if the pod name and namespace exists in the new cache.
In the HNS plugin, if standalone is activated, the plugin will take an enricher and send these flows via its internal ring buffer as others normally would for advanced metrics. Appropriate unit tests were added also.
Related Issue
#1547
Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Full end to end was tested on a VM running DNC to simulate running pods


Additional Notes
Add any additional notes or context about the pull request here.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.