Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

feat: track egress network traffic #11

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

g-linville
Copy link

@g-linville g-linville commented Jan 31, 2024

depends on https://github.com/acorn-io/infra-provisioning-cdk/pull/246

This PR adds a new metric to Alaz: alaz_egress. This is a counter that increases as a pod sends traffic to IP addresses outside of the cluster.

Signed-off-by: Grant Linville <grant@acorn.io>
Comment on lines +40 to +43
__u8 is_ingress = 0;
if (skb->ifindex == skb->ingress_ifindex) {
is_ingress = 1;
}
Copy link
Author

Choose a reason for hiding this comment

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

These two fields in the sk_buff struct are what allow us to determine during runtime whether this program is running on the ingress or egress qdisc.

Copy link

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

Just one non-blocking comment :)

datastore/prometheus.go Outdated Show resolved Hide resolved
Signed-off-by: Grant Linville <grant@acorn.io>
Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville merged commit 6b4c0bc into acorn-io:main Feb 6, 2024
@g-linville g-linville deleted the egress-metering branch February 6, 2024 01:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants