feat(ct-metrics): add initial conntrack metrics for Prometheus #1057
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
Create initial metrics for conntrack:
Related Issue
#806
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
This example
networkobservability_packets_count_per_connection{src_ip="10.244.0.94"}
includes10.244.0.94=prometheus-kube-state-metrics
,10.244.0.98= prometheus-prometheus-kube-prometheus-prometheus
and10.96.0.1=svc/kubernetes
In this example we see the
direction="TRAFFIC_DIRECTION_UNKNOWN"
since Prometheus was deployed before retina. Conntrack keeps track of source IP and destination IP, hence each time the connection is close thepackets_count_per_connection
goes to0
before increasing again until the next TCP connection is closed.This example shows a long-lived TCP connection between client
src_ip="10.244.0.35"
and server10.244.0.99
via svc10.96.188.34
This example shows the
bytes_count_per_connection
wheredst_ip=172.18.0.2
which is the pod IP forkube-proxy
Additional Notes
I pushed this PR to create a discussion based on the above examples. Points to discuss:
gauge
forpackets_count_per_connection
andbytes_count_per_connection
Known issues
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.