-
Notifications
You must be signed in to change notification settings - Fork 47
External metric not working for Eventhubs #90
Comments
related to #84 |
May I know how is this related to #84 ?? Kindly read my description, I've setup external metrics for other services and they are working fine. Now in the same cluster using the same adapter I'm unable to implement using event hubs. As per your suggestion if launching in different namespace was the problem nothing should have worked for me. I would like to have this issue reopened as I feel there has been a misunderstanding. I've even raised a case with Azure support regarding this and even they were not sure what the problem is. My case is still open there too |
The error reported above "Error from server (ServiceUnavailable): the server is currently unable to handle the request" was the exact same error message as #84 which was resolved by making sure everything was properly namespaced. Happy to help resolve if it is not related. Please be mindful of our contributing guidelines and code of conduct. Could you provide the logs of the metric adapter (specifically after a request for the eventhubs metric was queried) and the following info: Kubernetes version (
Logs ( Additional context Adapter version: |
@jsturtevant Adapter Version: 0.5.0 Logs from metric-adapter Pod:
In the logs, the external metric "extmetric01-eventhub" is the one using event-hubs. You can safely ignore others as they use other Azure services and they are working fine too. When I enter the command |
So it looks like the HPA is not able to find the metric adapter. It is interesting that it is working for the other metrics in the cluster. A few thoughts:
Can you hit the metric adapter directly using the following command:
|
Another thing to check is that the metric adapter is registered:
|
I was able to track down the issue. It appears that The reason you are getting the
At a more meta level, I am not sure you would want to scale on just the number of messages incoming. I would think you would either want scale based on the lag of the messages being processed or number of unprocessed messages. It doesn't look like either of those are captured via the Azure Metrics api. KEDA does have support for all the metrics you are currenlty scaling on, including supporting the number of unprocessed messages in eventhub. |
@jsturtevant
Coming to your point "It appears that IncomingMessages doesn't return any values through the Metric API at the Eventhub level which is where you are filtering with filter: EntityName eq 'customname'" I'm able to see metric graph for the metric "IncomingMessages" from the portal at eventhub level too. Below is a screenshot for your reference. Let me know if I've got anything wrong here and coming to KEDA I cannot do that since it supports only if I enable capture, as it can currently get from storage account only. This won't work for me for many reasons and cost is also one of them. Your efforts on this are to be appreciated! |
It seems when there are no messages for a period of time the result metric api for IncomingMessage returns an empty time series. After putting load on it for awhile a while I was getting a correct result back but after letting it sit for awhile I am getting the error again. The initial time for that value to come back was over several hours though. Although I understand your current cost constraint, the delay in the initial metrics showing up initially causes me to hesitate that this metric would be correct metric to scale on. As well, this metric might not work well as it will return the current Messages coming in which might peak then drop zero even though you haven't made a dent in the queue. Using this metric, you could be in a situation where there are no/low number of Incoming Messages which would cause the HPA to scale down but the processing pods and yet you could have a really high quantity in the event queue. KEDA does support the Azure Monitor metrics so you could use it to scale on this same metric there if you wanted thought I think you will run into the same challenges with this particular metric. |
@jsturtevant Yeah saw that KEDA has launched 1.3.0 recently with the Azure monitor scaler. Gonna give it a try now. Will update you how that goes, Also with respect to the metric behavior I think that is how it is supposed to behave as there are checkpoints and other stuff. Anyway I'll discuss with my team and update you. |
@jsturtevant Just now saw the exact same error in KEDA too. They closed your issue but it seems like they haven't fixed it. I've requested to reopen your issue again there. |
Describe the bug
I've setup the metric adapter successfully and have established external metrics for services such as service bus, application gateway. But however When I tried to setup one for eventhub for the metric "IncomingMessages" I was displayed with an error "Error from server (ServiceUnavailable): the server is currently unable to handle the request"
Below is my external metric YAML.
The text was updated successfully, but these errors were encountered: