-
Notifications
You must be signed in to change notification settings - Fork 9
Netflow Prometheus Implementation #543
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| Visit the [docs](https://docs.cast.ai/docs/getting-started) to connect your cluster. | ||
|
|
||
| ## Build Instructions |
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.
Let's add this to DEVELOPMENT.md file.
| var err error | ||
|
|
||
| ciliumCt4, err = bpf.OpenMap(proc.HostPath(filepath.Join(defaults.BPFFSRoot, defaults.TCGlobalsPath, ctmap.MapNameTCP4Global)), &ctmap.CtKey4Global{}, &ctmap.CtEntry{}) | ||
| ciliumCt4, err = bpf.OpenMap(filepath.Join(defaults.BPFFSRoot, defaults.TCGlobalsPath, ctmap.MapNameTCP4Global), &ctmap.CtKey4Global{}, &ctmap.CtEntry{}) |
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.
Are there some issues accessing cilium ebpf maps via /proc/1/root ?
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.
It didn't work for me in a kubeadm cluster baked by flatcar in AWS.
Did it for you?
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.
I haven't tested such setup. But on GKE, EKS with cilium haven't saw any issues.
Do you have some more context regarding the issue, what exactly didn't work just to understand it better?
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.
In cilium 1.16 the conntrackaccounting was disabled by default, thats why it wasnt reporting the bytes...
In 1.17 is solved (but you need to explicit enable this feature)
| var ( | ||
| // egressd-compatible metrics | ||
| egressdTransmitBytesTotal = promauto.NewCounterVec(prometheus.CounterOpts{ | ||
| Name: "egressd_transmit_bytes_total", |
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.
Sadly this approach will not work efficiently. In egressd we have explicit metrics push via remote write api.
https://github.com/castai/egressd/blob/main/exporter/sinks/prom.go#L116
By using remote write api it will support not only original prometheus but mimir/cortex too. Also it allows to have different prometheus instance just for netflows metrics.
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.
On egressd was the controller gathering metrics from the agent and then pushing remotely.
Probably kvisor has to implement the same approach... Do you have it on the roadmap?
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.
Yes, kvisor agent could push metrics directly from each agent to prometheus similar to clickhouse exporter.
For now we are no plans for it, but if you could update current prometheus_netflow_exporter that would great :)
|
Thanks for the change. Added few comments. |
Trying to address: #540
I am exposing the same metrics as it was in egressd.
This is just a starting point, it would be amazing to understand how far I can go to integrate these changes in kvisor.