Google Cloud Instance Group Autoscaler can not see my custom log-based metric

746 Views Asked by At

In google cloud I created a custom log-based metric to use for my instance group autoscaler. I can view the metric in the metrics explorer. The metrics explorer clearly shows that google added the requred "instance-id" and "zone" labels for me (yay). I can also so that the "Logs Ingestion" status for GCE Autoscaler is "All ingested". Unfortunately I am still seeing the following error in my instance group for the autoscaler:

"The custom metric that was specified does not exist or does not have the necessary labels. Check the metric."

This error appears in the top of the instance group summary when the instance group is launched. The result is that the metric in the "monitoring" section of the instance group is flat (0) instead of how it looks in the metrics explorer and the instance group is not autoscaled.

Any help would be appreciated.

Thanks!

1

There are 1 best solutions below

0
On

Think you might have specified incorrect Metrics identifier. You need to specify the name as custom.googleapis.com/appdemo_queue_depth_01.

enter image description here

If you haven't come across this page, please take a look at this page which includes detailed instructions on how to setup custom metrics.