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

Extend Azure Monitor scaler to support custom metrics #1883

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Extend Azure Monitor scaler to support custom metrics #1883

merged 1 commit into from
Jun 14, 2021

Conversation

amirschw
Copy link
Contributor

@amirschw amirschw commented Jun 13, 2021

Add metricNamespace parameter to the Azure Monitor scaler to allow scaling based on custom metrics.

When querying Custom metrics in Azure Monitor, the metric namespace must be provided in the API request. Otherwise, only default metrics can be found. E.g. for Azure Key Vault, when trying to get a custom metric without specifying the namespace, we will get the following error from the metrics client:

keda_metrics_adapter/provider "msg"="error getting metric for scaler" "error"="error getting azure monitor metric QueueDepth: insights.MetricsClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Failed to find metric configuration for provider: Microsoft.KeyVault, resource Type: vaults, metric: QueueDepth, Valid metrics: ServiceApiHit,ServiceApiLatency,ServiceApiResult,SaturationShoebox,Availability"" "scaledObject.Name"="nginx-scaler" "scaledObject.Namespace"="keda" "scaler"={}

Documentation update PR: kedacore/keda-docs#468

Partly fixes #1489 (I don't think it covers the Application Insights metrics)

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added
  • A PR is opened to update the documentation on (repo, PR) (if applicable)
  • Changelog has been updated

Signed-off-by: amirschw 24677563+amirschw@users.noreply.github.com

Signed-off-by: amirschw <24677563+amirschw@users.noreply.github.com>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zroubalik zroubalik merged commit 145a13b into kedacore:main Jun 14, 2021
@amirschw amirschw deleted the custom-metrics branch June 14, 2021 09:04
@zroubalik zroubalik added this to the v2.4.0 milestone Jul 14, 2021
nilayasiktoprak pushed a commit to nilayasiktoprak/keda that referenced this pull request Oct 23, 2021
Signed-off-by: amirschw <24677563+amirschw@users.noreply.github.com>
Signed-off-by: nilayasiktoprak <nilayasiktoprak@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide scaler for custom metrics in Azure Monitor
3 participants