-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to get metrics data from Cloudwach when using more than one dimension #6236
Comments
Hello |
I just encountered this bug. It is regression. Version 2.15.1This is the API call that is sent to AWS which doesn't have dimensions correctly split. So AWS returns an empty result. "MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "LoadBalancer;TargetGroup",
"Value": "app/lb1;targetgroup/tg1"
}
],
"MetricName": "RequestCount",
"Namespace": "AWS/ApplicationELB"
},
Version 2.14.1The API call working correctly in version 2.14.1 which we are currently running. "MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "LoadBalancer",
"Value": "app/lb1"
},
{
"Name": "TargetGroup",
"Value": "targetgroup/tg1"
}
],
"MetricName": "RequestCount",
"Namespace": "AWS/ApplicationELB"
},
I think this is caused by recent refactoring of cloudwatch scaler which removed logic for split of multiple dimensions. |
Thanks for pointing this out, seems like this is a bug indeed. |
Nice catch! I was wrong AFAICS, Could you open a PR fixing the issue? |
Report
We are using AWS Cloudwatch scaler.
When the metric we want to retrieve data for has one dimension, everything works as expected
When the metric has more than one diimension, the scaler seems not able to retrieve metrics data and default values is returned.
Expected Behavior
By defining this trigger
we expect to retrieve data from cloudwatch, but this is not happening
Actual Behavior
The keda operator logs says that the metrics is empty and the default value (0) is returned.
Running
``kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/***/s0-aws-cloudwatch?labelSelector=scaledobject.keda.sh%2Fname%3Dapplication"`
zero value (which is the default is returned)
The workaround we found to make this work is to use expression.
If we define the trigger like the following
the actual value for the metric is returned
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.15.1
Kubernetes Version
1.30
Platform
Amazon Web Services
Scaler Details
aws-cloudwatch
Anything else?
Another trigger definition we have, with only one dimension, is working as expected
The text was updated successfully, but these errors were encountered: