-
Notifications
You must be signed in to change notification settings - Fork 114
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
Mismatch Between Prometheus Metrics in Goflow2 and Grafana Dashboard #360
Comments
@firasrasmy-thg thank you for reporting, could you have a look at #361? |
@lspgn thank you for your prompt response. Based on this PR, it looks much better now: Metrics exposed by goflow2: Metrics targeted by Grafana dashboard: I noticed the last two metrics (goflow2_flow_traffic_size_bytes_count and goflow2_flow_traffic_size_bytes_sum) are not exposed by goflow2. Additionally, these goflow2 metrics are not targeted by the Grafana dashboard: goflow2_flow_dropped_packets_total, goflow2_flow_dropped_bytes_total, goflow2_flow_traffic_size_bytes, goflow2_flow_decoder_error_total, goflow2_flow_process_nf_total, goflow2_flow_process_nf_flowset_total, goflow2_flow_process_sf_total I'd like to take this opportunity to ask you the following: I have goflow2 deployed in two setups, both receiving IMON flows. One of them is exposing all the goflow2_flow_process_nf_ metrics while the other one is not. I haven't had the chance to check the source code to determine whether this behavior is intentional. I would greatly appreciate your thoughts on this. |
Unless I'm mistaken, that's a summary which provides Lines 43 to 50 in c2fe351
Ah yes, the compose directory is to provide some boilerplate but it's far from being a fully maintained suite.
Running the same versions? If it's missing, it did not process any NetFlow packet. Was there any output? |
Ah yes you are right, my mistake! I just quickly searched for prometheus.NewCounterVec in metrics.go and missed prometheus.NewSummaryVec. I see both my goflow2 instances are exposing the '_sum' and '_count' metrics.
Yes, both of them are running the same version (GoFlow2 v2.2.1-4-gbf8b794) and receiving exactly the same IMON flows. Both setups produce exactly the same results. The goflow2 instance exposing the goflow2_flow_process_nf_ metrics is running in a Docker container, while the other instance is deployed in a Kubernetes cluster utilizing an OpenStack Octavia load balancer to expose the goflow2 port externally. |
Hmm unless each instance received part of the traffic and in the case of NetFlow/IPFIX, if one of the two nodes does not have the templates, it won't be able to decode and the metric won't be created. |
It turned out that the template packets were being forwarded to another goflow2 pod. After modifying the loadbalancer algorithm, they are now delivered to the same pod and I see all metrics are available now. Thanks for your support on this, Louis! |
The prometheus metrics exposed by goflow2 (as seen in the source code) do not match most of the target metrics in the Grafana dashboard at https://github.com/netsampler/goflow2/blob/main/compose/kcg/grafana/dashboards/perfs.json. This is in addition to the fact that target metrics in perfs.json lacks the prefix namespace (goflow2).
The text was updated successfully, but these errors were encountered: