Skip to content

Conversation

@BeegiiK
Copy link
Contributor

@BeegiiK BeegiiK commented Sep 2, 2025

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 .proto file aswell since the messages couldn't be recognized in flow_utils.go. This follows RetinaMetadata quite closely. We then expose the GetHNSMetadata() so that when the metric module's process flow is invoked for each metric, the relevant info can be extracted

The 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

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation 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

Full end to end was tested on a VM running DNC to simulate running pods
image
image

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.

@BeegiiK BeegiiK requested a review from a team as a code owner September 2, 2025 12:33
@BeegiiK BeegiiK changed the title feat(standalone): Metrics feat(standalone): Create new metrics module that processes flows and update HNS plugin to emit relevant metrics Sep 2, 2025
@BeegiiK BeegiiK self-assigned this Sep 2, 2025
@BeegiiK BeegiiK requested review from anubhabMajumdar and vakalapa and removed request for jimassa and paulyufan2 September 3, 2025 08:34
}

if d.enableStandalone {
d.processStandaloneFlow(flow)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should split standard and standalone metrics module. Each mode should have its own enrichment/metric computation logic.

@github-actions
Copy link

This PR will be closed in 7 days due to inactivity.

@github-actions github-actions bot added the meta/waiting-for-author Blocked and waiting on the author label Oct 16, 2025
@github-actions
Copy link

Pull request closed due to inactivity.

@github-actions github-actions bot closed this Oct 24, 2025
@BeegiiK BeegiiK reopened this Nov 11, 2025
@github-actions github-actions bot removed the meta/waiting-for-author Blocked and waiting on the author label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants