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

Stackdriver metrics are not supported by HorizontalPodAutoscaler #489

Open
red8888 opened this issue Oct 31, 2022 · 2 comments
Open

Stackdriver metrics are not supported by HorizontalPodAutoscaler #489

red8888 opened this issue Oct 31, 2022 · 2 comments
Labels
custom-metrics-stackdriver-adapter Issues for custom-metrics-stackdriver-adapter

Comments

@red8888
Copy link

red8888 commented Oct 31, 2022

Following best practices I created my custom SD metric named this: "custom/custom.googleapis.com/mymetric" https://cloud.google.com/monitoring/api/v3/naming-conventions

I tried to use it in HorizontalPodAutoscaler.autoscaling.

That generated this error: spec.metrics[0].pods.metric.name: Invalid value: "custom/custom.googleapis.com/srfw_ready_count": may not contain '/'

Am I doing something wrong?

@red8888
Copy link
Author

red8888 commented Oct 31, 2022

Looks like I have this issue: #198

I just installed the metrics adapter last week so should have latest.

Do I define the metric name in HPA settings like this: "custom|custom.googleapis.com|mymetric"?
I then GKE is smart enough to find the stackdriver metric named: "custom/custom.googleapis.com/mymetric"?

Why isn't this documented? https://cloud.google.com/kubernetes-engine/docs/tutorials/autoscaling-metrics#step4

OR do I just leave off "custom/custom.googleapis.com" entirely and just do mymetric ?

@CatherineF-dev
Copy link
Contributor

Hi, you can use mymetric or custom.googleapis.com|mymetric

@CatherineF-dev CatherineF-dev added the custom-metrics-stackdriver-adapter Issues for custom-metrics-stackdriver-adapter label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom-metrics-stackdriver-adapter Issues for custom-metrics-stackdriver-adapter
Projects
None yet
Development

No branches or pull requests

2 participants