Skip to content
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

Cloudwatch scaler - Support cloudwatch metrics with multiple dimensions #1230

Closed
jmhoeft opened this issue Oct 7, 2020 · 4 comments
Closed
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@jmhoeft
Copy link

jmhoeft commented Oct 7, 2020

Support cloudwatch metrics with multiple dimensions

Use-Case

Right now the cloudwatch scaler only lets you specify a single dimension name and value. This means you can't scale on any metrics with multiple dimensions.

Specification

It would be great to be able to specify a list of dimensions in the ScaleTrigger:

- type: aws-cloudwatch
  metadata:
    # Required: namespace
    namespace: MyCustomNamespace
    # Required: At least one dimension name
    dimensions:
    - Name: QueueName
      Value: keda
    - Name: env
      Value: dev
    metricName: AGE
    targetMetricValue: "2"
    minMetricValue: "0"
    ...
@jmhoeft jmhoeft added feature-request All issues for new features that have not been committed to needs-discussion labels Oct 7, 2020
@jmhoeft
Copy link
Author

jmhoeft commented Oct 7, 2020

The cloudwatch GetMetricData call definitely supports multiple dimensions on the metric, the limiting factor here is the ScaleTriggers Metadata being map[string]string. I already did some work to prove this out but wanted to hear if you folks had any thoughts on how to implement this.

@JonasMatos0
Copy link
Contributor

Got confirmation that this is a good feature to be implemented.
#1321

I'm taking a look on the needed changes. If you want to collaborate yourself, please let me know what you have so far, @jmhoeft .

@jmhoeft
Copy link
Author

jmhoeft commented Dec 7, 2020

Hey! Somehow just saw this. Let me remember what I was doing and get it pushed soon. Basically, what I was unsure about was that this call works just fine with multiple dimensions, but I wasn't sure the best way to get the inputs. It will probably require changes to CRDs.

@JonasMatos0
Copy link
Contributor

@jmhoeft solution merged on
#1517
kedacore/keda-docs#352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
None yet
Development

No branches or pull requests

3 participants