-
Notifications
You must be signed in to change notification settings - Fork 30
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
adding drop bytes and drop packets count metric #316
base: main
Are you sure you want to change the base?
Conversation
@@ -61,6 +61,8 @@ struct data_t { | |||
__u32 dest_port; | |||
__u32 protocol; | |||
__u32 verdict; | |||
__u32 packet_sz; | |||
__u8 is_egress; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use unsigned 8 here? Is it this a reference from kernel data structure or since the value be 0 or 1 we chose the __u8
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its just to store boolean value
@yash97 How are these metrics being exposed to cx and how can cx use these metrics for monitoring ? |
@Pavani-Panakanti cx can scrape metrics through open prometheus port. |
Issue #, if available:
solves #229
Description of changes:
This PR enhances the network policy agent by adding packet length and direction information to policy events. These additions enable the export of more detailed metrics, specifically:
Sample Output of metrics:
We have prometheus port setup here Code Customer can use Prometheus or other tool to scrape metrics.
Important Notes
These metrics will only be measured if the --enable-policy-event-logs flag is set to true.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.