GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver

Custom log-based metric not recognized by HPA

Open
#683 6 comments 0 reactions 0 assignees View on GitHub
custom-metrics-stackdriver-adapter
Dominant language
Go
Stars
409
Forks
236
Avg merge
2h 34m
Merged PRs (30d)
9

Description

We've setup Stackdriver and created a custom log-based metric to scale our workload. We've followed the readme documentation provided, but for whatever reason HPA is not able to scale "Unable to read metric". When we look at our custom log-based metric in Metrics Explorer we see data so we know the custom metric was created correctly. We added labels to the custom log based metric to bind it to the correct GKE resource as mentioned in the documentation, which we validated, but still nothing. We even tried configuring the log-based metric as both External and Custom, but neither worked.

Is HPA able to scale off Custom Log-Based Metrics (logging.googleapis.com) VS. Custom Metrics (custom.googleapis.com)?

Stackdriver:

![image](https://github.com/GoogleCloudPlatform/k8s-stackdriver/assets/167329990/2f1c4229-f0e2-4056-9934-5e84adea998b)

Custom Metric:

![image](https://github.com/GoogleCloudPlatform/k8s-stackdriver/assets/167329990/0c6b53ac-51ab-4321-adec-0189d6064763)

HPA:

![image](https://github.com/GoogleCloudPlatform/k8s-stackdriver/assets/167329990/2372901f-0f9e-49bc-a1ed-700b98c633e3)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.