AWS Cloudwatch Scaler: Not able to fetch the metrics from cloudwatch through query expression and dimentions also #5310
Unanswered
sushama-kothawale
asked this question in
Q&A / Need Help
Replies: 2 comments 7 replies
-
Hello @sushama-kothawale The About your expression, the log you sent says |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks @JorTurFer for looking into this. I am using below query to check the MessageCount on queue event_queue.CMW.picasso_media_queue
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have KEDA running on EKS cluster. EKS version 1.25 , Keda version 2.11.1
I am using AWS cloudwatch scaler https://keda.sh/docs/2.12/scalers/aws-cloudwatch/
Here is my scaledobject definition:
I wanted to fetch the MessageCount metric of AWS/AmazonMQ service for above queue name. If the MessageCount exceeds the targetvalue then we wanted to scale the deployment.
We tried clouwatch query added as expression inside scaledobject as below:
expression: SELECT SUM("MessageCount") FROM "AWS/AmazonMQ" WHERE Queue = 'event_queue.CMW.picasso_callback_queue' AND Broker = 'content-rmq-integration' metricName: MessageCount
Expected behaviour:
Keda should scrape the metrics from AWS cloudwatch and it should scale if MessageCount reached the threashold value.
Actual Behavior:
We are seeing below logs on keda-operator:
Reconciling ScaledObject {"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "ScaledObject": {"name":"cnt-dlm-cmw","namespace":"integration"}, "namespace": "integration", "name": "cnt-dlm-cmw", "reconcileID": "bff91f8d-0d6d-43eb-82d3-42ed2138ecee"} 2023-12-22T04:45:35Z INFO aws_cloudwatch_scaler empty metric data received, returning minMetricValue {"type": "ScaledObject", "namespace": "integration", "name": "cnt-dlm-cmw"} 2023-12-22T04:45:40Z INFO aws_cloudwatch_scaler empty metric data received, returning minMetricValue {"type": "ScaledObject", "namespace": "integration", "name": "cnt-dlm-cmw"} 2023-12-22T04:45:41Z INFO
When we check the current usage through HPA it shows as below:
k get hpa -n integration | grep keda-hpa-cnt-dlm-cmw keda-hpa-cnt-dlm-cmw Deployment/cnt-dlm-cmw 500m/10 (avg) 2 10 2
HPA spec is as below:
So wanted to understand what is this 500m value. Even when we push the 1000 msgs on the queue it does not go beyond this 500m value.
Can someone please help on this?
cc: @JorTurFer
Beta Was this translation helpful? Give feedback.
All reactions