-
Notifications
You must be signed in to change notification settings - Fork 991
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
Event Hub - incorrect metrics values #5784
Comments
Hello, |
Hello @JorTurFer thank you for your quick response. The issue is that once the number is in e.g. current average number: 1741 current average number: 580334m |
Are you scrapping prometheus metric generated by KEDA? I almost sure that you have a peak which justifies the scaling out, as you said, you're under the threshold. The only option for that behaviour without a peak is that you have changed the target value and the HPA controller is still during the scaling cooldown (300 after the last scaling out) |
No no, it doesn't use the average value at all. KEDA uses the current value, so if it's 0 in the eventhub and you don't see 0 in KEDA, it can be a misconfiguration or a bug. Do you see any value different from 0? You can manually query the metric value and check what KEDA returns: https://keda.sh/docs/2.14/operate/metrics-server/#querying-metrics-exposed-by-keda-metrics-server |
Hello @JorTurFer to answer your question "Do you see any value different from 0?" yes, even when even hub was turned off the HPA had always some number in meterics. We enabled the event hub again and for some reason, we stopped getting float values, and scaling is working as expected. Or at least I did not catch any float number during my observation since there is no history of this value I cannot confirm. But it seems that once the float values stopped occurring the scaling is ok.
The documentation mentions that these are average values, we are using default. If that is not true than sorry I must missed it. However, the values from metrics still do not match values from event hub metrics. |
mb, I understood that KEDA recovers the average value from the eventhub. You are right and k8s workload will be scaled based on the average value calculated using the instant eventhub value |
Float values are correct and they can happen, if eventhub returns 7 and you have 4 pods, you'll have a float value in average |
Report
I'm getting incorrect values from the external metric. Sometimes the external metrics provide the correct values but most of the time the current values are way off.
Metrics examples:
Here you can see that averageValue is 1040334m which does not make sense and it will trigger the maximum possible scaling.
From time to time the averageValue is more accurate and it looks more realistic.
Here are the incoming messages metrics directly from Azure and as you can see we have usually an average of 100 incoming messages per minute.
Expected Behavior
The Average values should be more consistent and showing the real values.
Actual Behavior
The current values are jumping from 600 to 580334m while the real average incoming message are usually around 100. We are processing approximately 22 000 messages per day so the average value like 580334m does not make any sense.
Steps to Reproduce the Problem
azure-eventhub
triggerLogs from KEDA operator
KEDA Version
2.11.2
Kubernetes Version
1.28
Platform
Microsoft Azure
Scaler Details
azure-eventhub
Anything else?
No response
The text was updated successfully, but these errors were encountered: